├── .b4-config ├── .gitattributes ├── .gitignore ├── AUTHORS ├── ChangeLog ├── LICENSE ├── LICENSE.GPL-2.0-only ├── LICENSE.MIT ├── MANIFEST.in ├── README ├── SECURITY.md ├── TODO ├── bin ├── bitbake ├── bitbake-config-build ├── bitbake-diffsigs ├── bitbake-dumpsig ├── bitbake-getvar ├── bitbake-hashclient ├── bitbake-hashserv ├── bitbake-layers ├── bitbake-prserv ├── bitbake-selftest ├── bitbake-server ├── bitbake-worker ├── git-make-shallow ├── toaster └── toaster-eventreplay ├── classes └── base.bbclass ├── conf └── bitbake.conf ├── contrib ├── README ├── autobuilderlog.json ├── b4-wrapper-bitbake.py ├── bbdev.sh ├── bbparse-torture.py ├── dump_cache.py ├── hashserv │ └── Dockerfile ├── prserv │ └── Dockerfile └── vim │ ├── LICENSE.txt │ ├── ftdetect │ └── bitbake.vim │ ├── ftplugin │ └── bitbake.vim │ ├── indent │ └── bitbake.vim │ ├── plugin │ ├── newbb.vim │ └── newbbappend.vim │ └── syntax │ └── bitbake.vim ├── doc ├── .gitignore ├── COPYING.GPL ├── COPYING.MIT ├── Makefile ├── README ├── _templates │ ├── breadcrumbs.html │ ├── footer.html │ └── layout.html ├── bitbake-user-manual │ ├── bitbake-user-manual-execution.rst │ ├── bitbake-user-manual-fetching.rst │ ├── bitbake-user-manual-hello.rst │ ├── bitbake-user-manual-intro.rst │ ├── bitbake-user-manual-library-functions.rst │ ├── bitbake-user-manual-metadata.rst │ ├── bitbake-user-manual-ref-variables-context.rst │ ├── bitbake-user-manual-ref-variables.rst │ └── figures │ │ ├── bb_multiconfig_files.png │ │ └── bitbake-title.png ├── bitbake.1 ├── conf.py ├── genindex.rst ├── index.rst ├── releases.rst ├── sphinx-static │ ├── switchers.js │ └── theme_overrides.css └── template │ ├── Vera.ttf │ ├── VeraMoBd.ttf │ ├── VeraMono.ttf │ └── draft.png ├── lib ├── bb │ ├── COW.py │ ├── __init__.py │ ├── acl.py │ ├── asyncrpc │ │ ├── __init__.py │ │ ├── client.py │ │ ├── connection.py │ │ ├── exceptions.py │ │ └── serv.py │ ├── build.py │ ├── cache.py │ ├── cache_extra.py │ ├── checksum.py │ ├── codeparser.py │ ├── command.py │ ├── compress │ │ ├── _pipecompress.py │ │ ├── lz4.py │ │ └── zstd.py │ ├── cooker.py │ ├── cookerdata.py │ ├── daemonize.py │ ├── data.py │ ├── data_smart.py │ ├── event.py │ ├── fetch2 │ │ ├── README │ │ ├── __init__.py │ │ ├── az.py │ │ ├── bzr.py │ │ ├── clearcase.py │ │ ├── crate.py │ │ ├── cvs.py │ │ ├── gcp.py │ │ ├── git.py │ │ ├── gitannex.py │ │ ├── gitsm.py │ │ ├── gomod.py │ │ ├── hg.py │ │ ├── local.py │ │ ├── npm.py │ │ ├── npmsw.py │ │ ├── osc.py │ │ ├── perforce.py │ │ ├── repo.py │ │ ├── s3.py │ │ ├── sftp.py │ │ ├── ssh.py │ │ ├── svn.py │ │ └── wget.py │ ├── main.py │ ├── methodpool.py │ ├── monitordisk.py │ ├── msg.py │ ├── namedtuple_with_abc.py │ ├── parse │ │ ├── __init__.py │ │ ├── ast.py │ │ └── parse_py │ │ │ ├── BBHandler.py │ │ │ ├── ConfHandler.py │ │ │ └── __init__.py │ ├── process.py │ ├── progress.py │ ├── providers.py │ ├── pysh │ │ ├── __init__.py │ │ ├── pyshlex.py │ │ ├── pyshyacc.py │ │ └── sherrors.py │ ├── remotedata.py │ ├── runqueue.py │ ├── server │ │ ├── __init__.py │ │ ├── process.py │ │ ├── xmlrpcclient.py │ │ └── xmlrpcserver.py │ ├── siggen.py │ ├── taskdata.py │ ├── tests │ │ ├── __init__.py │ │ ├── codeparser.py │ │ ├── color.py │ │ ├── compression.py │ │ ├── cooker.py │ │ ├── cow.py │ │ ├── data.py │ │ ├── event.py │ │ ├── fetch-testdata │ │ │ ├── apple │ │ │ │ └── cups │ │ │ │ │ └── releases │ │ │ ├── debian │ │ │ │ └── pool │ │ │ │ │ └── main │ │ │ │ │ ├── d │ │ │ │ │ └── db5.3 │ │ │ │ │ │ └── index.html │ │ │ │ │ └── m │ │ │ │ │ └── minicom │ │ │ │ │ └── index.html │ │ │ ├── downloads │ │ │ │ └── enchant │ │ │ │ │ └── 1.6.0 │ │ │ │ │ └── index.html │ │ │ ├── files │ │ │ │ ├── v2.8 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.0 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.1 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.10 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.11 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.12 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.13 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.14 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.15 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.16 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.2 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.3 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.4 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.5 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.6 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.7 │ │ │ │ │ └── index.html │ │ │ │ ├── v3.8 │ │ │ │ │ └── index.html │ │ │ │ └── v3.9 │ │ │ │ │ └── index.html │ │ │ ├── pub │ │ │ │ └── linux │ │ │ │ │ └── utils │ │ │ │ │ └── util-linux │ │ │ │ │ ├── v2.23 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.24 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.25 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.26 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.27 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.28 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.29 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.30 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.31 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.32 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.33 │ │ │ │ │ └── index.html │ │ │ │ │ ├── v2.34 │ │ │ │ │ └── index.html │ │ │ │ │ └── v2.35 │ │ │ │ │ └── index.html │ │ │ ├── releases │ │ │ │ ├── eglibc │ │ │ │ │ └── index.html │ │ │ │ ├── gnu-config │ │ │ │ │ └── index.html │ │ │ │ └── individual │ │ │ │ │ └── xserver │ │ │ │ │ └── index.html │ │ │ └── software │ │ │ │ ├── libxml2 │ │ │ │ ├── 2.10 │ │ │ │ │ └── index.html │ │ │ │ ├── 2.9 │ │ │ │ │ └── index.html │ │ │ │ └── index.html │ │ │ │ ├── miniupnp │ │ │ │ └── download.php │ │ │ │ └── pulseaudio │ │ │ │ └── releases │ │ │ │ └── index.html │ │ ├── fetch.py │ │ ├── parse.py │ │ ├── runqueue-tests │ │ │ ├── classes │ │ │ │ ├── base.bbclass │ │ │ │ ├── image.bbclass │ │ │ │ └── native.bbclass │ │ │ ├── conf │ │ │ │ ├── bitbake.conf │ │ │ │ └── multiconfig │ │ │ │ │ ├── mc-1.conf │ │ │ │ │ └── mc_2.conf │ │ │ └── recipes │ │ │ │ ├── a1.bb │ │ │ │ ├── b1.bb │ │ │ │ ├── c1.bb │ │ │ │ ├── d1.bb │ │ │ │ ├── e1.bb │ │ │ │ ├── f1.bb │ │ │ │ ├── fails-mc │ │ │ │ ├── fails-mc1.bb │ │ │ │ └── fails-mc2.bb │ │ │ │ ├── g1.bb │ │ │ │ └── h1.bb │ │ ├── runqueue.py │ │ ├── siggen.py │ │ ├── support │ │ │ └── httpserver.py │ │ └── utils.py │ ├── tinfoil.py │ ├── ui │ │ ├── __init__.py │ │ ├── buildinfohelper.py │ │ ├── eventreplay.py │ │ ├── icons │ │ │ ├── images │ │ │ │ ├── images_display.png │ │ │ │ └── images_hover.png │ │ │ ├── indicators │ │ │ │ ├── add-hover.png │ │ │ │ ├── add.png │ │ │ │ ├── alert.png │ │ │ │ ├── confirmation.png │ │ │ │ ├── denied.png │ │ │ │ ├── error.png │ │ │ │ ├── info.png │ │ │ │ ├── issues.png │ │ │ │ ├── refresh.png │ │ │ │ ├── remove-hover.png │ │ │ │ ├── remove.png │ │ │ │ └── tick.png │ │ │ ├── info │ │ │ │ ├── info_display.png │ │ │ │ └── info_hover.png │ │ │ ├── layers │ │ │ │ ├── layers_display.png │ │ │ │ └── layers_hover.png │ │ │ ├── packages │ │ │ │ ├── packages_display.png │ │ │ │ └── packages_hover.png │ │ │ ├── recipe │ │ │ │ ├── recipe_display.png │ │ │ │ └── recipe_hover.png │ │ │ ├── settings │ │ │ │ ├── settings_display.png │ │ │ │ └── settings_hover.png │ │ │ └── templates │ │ │ │ ├── templates_display.png │ │ │ │ └── templates_hover.png │ │ ├── knotty.py │ │ ├── ncurses.py │ │ ├── taskexp.py │ │ ├── taskexp_ncurses.py │ │ ├── teamcity.py │ │ ├── toasterui.py │ │ ├── uievent.py │ │ └── uihelper.py │ ├── utils.py │ └── xattr.py ├── bblayers │ ├── __init__.py │ ├── action.py │ ├── common.py │ ├── layerindex.py │ └── query.py ├── bs4 │ ├── AUTHORS │ ├── CHANGELOG │ ├── LICENSE │ ├── __init__.py │ ├── builder │ │ ├── __init__.py │ │ ├── _html5lib.py │ │ ├── _htmlparser.py │ │ └── _lxml.py │ ├── css.py │ ├── dammit.py │ ├── diagnose.py │ ├── element.py │ └── formatter.py ├── codegen.py ├── hashserv │ ├── __init__.py │ ├── client.py │ ├── server.py │ ├── sqlalchemy.py │ ├── sqlite.py │ └── tests.py ├── layerindexlib │ ├── README │ ├── __init__.py │ ├── cooker.py │ ├── plugin.py │ ├── restapi.py │ └── tests │ │ ├── __init__.py │ │ ├── common.py │ │ ├── cooker.py │ │ ├── layerindexobj.py │ │ ├── restapi.py │ │ └── testdata │ │ ├── README │ │ ├── build │ │ └── conf │ │ │ └── bblayers.conf │ │ ├── layer1 │ │ └── conf │ │ │ └── layer.conf │ │ ├── layer2 │ │ └── conf │ │ │ └── layer.conf │ │ ├── layer3 │ │ └── conf │ │ │ └── layer.conf │ │ └── layer4 │ │ └── conf │ │ └── layer.conf ├── ply │ ├── __init__.py │ ├── lex.py │ └── yacc.py ├── progressbar │ ├── LICENSE.txt │ ├── __init__.py │ ├── compat.py │ ├── progressbar.py │ └── widgets.py ├── prserv │ ├── __init__.py │ ├── client.py │ ├── db.py │ ├── serv.py │ └── tests.py ├── pyinotify.py ├── simplediff │ ├── LICENSE │ └── __init__.py └── toaster │ ├── __init__.py │ ├── bldcollector │ ├── __init__.py │ ├── admin.py │ ├── urls.py │ └── views.py │ ├── bldcontrol │ ├── __init__.py │ ├── admin.py │ ├── bbcontroller.py │ ├── localhostbecontroller.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ ├── checksettings.py │ │ │ └── runbuilds.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20160120_1250.py │ │ ├── 0003_add_cancelling_state.py │ │ ├── 0004_auto_20160523_1446.py │ │ ├── 0005_reorder_buildrequest_states.py │ │ ├── 0006_brlayer_local_source_dir.py │ │ ├── 0007_brlayers_optional_gitinfo.py │ │ ├── 0008_models_bigautofield.py │ │ └── __init__.py │ ├── models.py │ └── views.py │ ├── logs │ └── .gitignore │ ├── manage.py │ ├── orm │ ├── __init__.py │ ├── fixtures │ │ ├── README │ │ ├── check_fixtures.py │ │ ├── custom_toaster_append.sh_sample │ │ ├── gen_fixtures.py │ │ ├── oe-core.xml │ │ ├── poky.xml │ │ └── settings.xml │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── lsupdates.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_customimagerecipe.py │ │ ├── 0003_customimagepackage.py │ │ ├── 0004_provides.py │ │ ├── 0005_task_field_separation.py │ │ ├── 0006_add_cancelled_state.py │ │ ├── 0007_auto_20160523_1446.py │ │ ├── 0008_refactor_artifact_models.py │ │ ├── 0009_target_package_manifest_path.py │ │ ├── 0010_delete_layer_source_references.py │ │ ├── 0011_delete_layersource.py │ │ ├── 0012_use_release_instead_of_up_branch.py │ │ ├── 0013_recipe_parse_progress_fields.py │ │ ├── 0014_allow_empty_buildname.py │ │ ├── 0015_layer_local_source_dir.py │ │ ├── 0016_clone_progress.py │ │ ├── 0017_distro_clone.py │ │ ├── 0018_project_specific.py │ │ ├── 0019_django_2_2.py │ │ ├── 0020_models_bigautofield.py │ │ ├── 0021_eventlogsimports.py │ │ └── __init__.py │ └── models.py │ ├── pytest.ini │ ├── tests │ ├── __init__.py │ ├── browser │ │ ├── README │ │ ├── __init__.py │ │ ├── selenium_helpers.py │ │ ├── selenium_helpers_base.py │ │ ├── test_all_builds_page.py │ │ ├── test_all_projects_page.py │ │ ├── test_builddashboard_page.py │ │ ├── test_builddashboard_page_artifacts.py │ │ ├── test_builddashboard_page_recipes.py │ │ ├── test_builddashboard_page_tasks.py │ │ ├── test_delete_project.py │ │ ├── test_js_unit_tests.py │ │ ├── test_landing_page.py │ │ ├── test_layerdetails_page.py │ │ ├── test_most_recent_builds_states.py │ │ ├── test_new_custom_image_page.py │ │ ├── test_new_project_page.py │ │ ├── test_project_builds_page.py │ │ ├── test_project_config_page.py │ │ ├── test_project_page.py │ │ ├── test_sample.py │ │ ├── test_task_page.py │ │ └── test_toastertable_ui.py │ ├── builds │ │ ├── README │ │ ├── __init__.py │ │ ├── buildtest.py │ │ └── test_core_image_min.py │ ├── commands │ │ ├── __init__.py │ │ ├── test_loaddata.py │ │ ├── test_lsupdates.py │ │ └── test_runbuilds.py │ ├── db │ │ ├── __init__.py │ │ └── test_db.py │ ├── eventreplay │ │ ├── README │ │ └── __init__.py │ ├── functional │ │ ├── README │ │ ├── __init__.py │ │ ├── functional_helpers.py │ │ ├── test_create_new_project.py │ │ ├── test_functional_basic.py │ │ ├── test_project_config.py │ │ ├── test_project_page.py │ │ ├── test_project_page_tab_config.py │ │ └── utils.py │ ├── toaster-tests-requirements.txt │ └── views │ │ ├── README │ │ ├── __init__.py │ │ └── test_views.py │ ├── toastergui │ ├── __init__.py │ ├── api.py │ ├── buildtables.py │ ├── fixtures │ │ └── toastergui-unittest-data.xml │ ├── forms.py │ ├── static │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap.min.css.map │ │ │ ├── bootstrap3-transition.css │ │ │ ├── default.css │ │ │ ├── font-awesome.min.css │ │ │ ├── images │ │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ ├── jquery-ui.min.css │ │ │ ├── jquery-ui.structure.min.css │ │ │ ├── jquery-ui.theme.min.css │ │ │ ├── jquery.dataTables-1.13.8.min.css │ │ │ ├── jquery.treetable.css │ │ │ ├── jquery.treetable.theme.default.css │ │ │ ├── jquery.treetable.theme.toaster.css │ │ │ ├── qunit-1.18.0.css │ │ │ └── screen.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── html │ │ │ └── layer_deps_modal.html │ │ ├── img │ │ │ ├── logo.png │ │ │ └── toaster_bw.png │ │ ├── jquery-treetable-license │ │ │ ├── GPL-LICENSE.txt │ │ │ ├── MIT-LICENSE.txt │ │ │ └── README.md │ │ ├── jquery.treetable.theme.toaster.css │ │ └── js │ │ │ ├── .jshintrc │ │ │ ├── bootstrap-3.4.1.js │ │ │ ├── bootstrap-3.4.1.min.js │ │ │ ├── customrecipe.js │ │ │ ├── filtersnippet.js │ │ │ ├── highlight.pack.js │ │ │ ├── importlayer.js │ │ │ ├── jquery-2.0.3.min.js │ │ │ ├── jquery-2.0.3.min.map │ │ │ ├── jquery-3.7.1.min.js │ │ │ ├── jquery-3.7.1.min.map │ │ │ ├── jquery-ui.min.js │ │ │ ├── jquery.cookie.js │ │ │ ├── jquery.dataTables-1.13.8.min.js │ │ │ ├── jquery.treetable.js │ │ │ ├── jsrender.min.js │ │ │ ├── layerBtn.js │ │ │ ├── layerDepsModal.js │ │ │ ├── layerdetails.js │ │ │ ├── libtoaster.js │ │ │ ├── mrbsection.js │ │ │ ├── newcustomimage_modal.js │ │ │ ├── projectpage.js │ │ │ ├── projecttopbar.js │ │ │ ├── qunit-1.18.0.js │ │ │ ├── recipedetails.js │ │ │ ├── table.js │ │ │ ├── tests │ │ │ └── test.js │ │ │ ├── typeahead.jquery.js │ │ │ ├── ui-bootstrap-tpls-0.11.0.js │ │ │ └── ui-bootstrap-tpls-0.11.0.min.js │ ├── tablefilter.py │ ├── tables.py │ ├── templates │ │ ├── base.html │ │ ├── base_specific.html │ │ ├── basebuilddetailpage.html │ │ ├── basebuildpage.html │ │ ├── baseprojectbuildspage.html │ │ ├── baseprojectpage.html │ │ ├── baseprojectspecificpage.html │ │ ├── basetable_bottom.html │ │ ├── basetable_top.html │ │ ├── basetable_top_layers.html │ │ ├── bfile.html │ │ ├── brtargets.html │ │ ├── builddashboard.html │ │ ├── buildinfo-toastertable.html │ │ ├── builds-toastertable.html │ │ ├── command_line_builds.html │ │ ├── configuration.html │ │ ├── configvars.html │ │ ├── cpuusage.html │ │ ├── customise_btn.html │ │ ├── customrecipe.html │ │ ├── detail_pagination_bottom.html │ │ ├── detail_search_header.html │ │ ├── detail_sorted_header.html │ │ ├── dirinfo.html │ │ ├── diskio.html │ │ ├── distro_btn.html │ │ ├── editcustomimage_modal.html │ │ ├── filtersnippet.html │ │ ├── generic-toastertable-page.html │ │ ├── health.html │ │ ├── importlayer.html │ │ ├── js-unit-tests.html │ │ ├── landing.html │ │ ├── landing_specific.html │ │ ├── layer_btn.html │ │ ├── layerdetails.html │ │ ├── machine_btn.html │ │ ├── mrb_section.html │ │ ├── newcustomimage.html │ │ ├── newcustomimage_modal.html │ │ ├── newproject.html │ │ ├── newproject_specific.html │ │ ├── package_built_dependencies.html │ │ ├── package_built_detail.html │ │ ├── package_detail_base.html │ │ ├── package_included_dependencies.html │ │ ├── package_included_detail.html │ │ ├── package_included_reverse_dependencies.html │ │ ├── package_included_tabs.html │ │ ├── pkg_add_rm_btn.html │ │ ├── project.html │ │ ├── project_specific.html │ │ ├── project_specific_topbar.html │ │ ├── projectbuilds-toastertable.html │ │ ├── projectbuilds.html │ │ ├── projectconf.html │ │ ├── projects-toastertable.html │ │ ├── projecttopbar.html │ │ ├── recipe.html │ │ ├── recipe_add_btn.html │ │ ├── recipe_btn.html │ │ ├── recipe_packages.html │ │ ├── recipedetails.html │ │ ├── snippets │ │ │ ├── gitrev_popover.html │ │ │ ├── pkg_dependencies_popover.html │ │ │ └── pkg_revdependencies_popover.html │ │ ├── tablesort.html │ │ ├── target.html │ │ ├── task.html │ │ ├── toastertable-filter.html │ │ ├── toastertable-simple.html │ │ ├── toastertable.html │ │ └── unavailable_artifact.html │ ├── templatetags │ │ ├── __init__.py │ │ ├── field_values_filter.py │ │ ├── objects_to_dictionaries_filter.py │ │ ├── project_url_tag.py │ │ └── projecttags.py │ ├── typeaheads.py │ ├── urls.py │ ├── views.py │ └── widgets.py │ ├── toastermain │ ├── __init__.py │ ├── logs.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ ├── builddelete.py │ │ │ ├── buildimport.py │ │ │ ├── buildslist.py │ │ │ ├── checksocket.py │ │ │ └── perf.py │ ├── settings.py │ ├── settings_production_example.py │ ├── settings_test.py │ ├── urls.py │ └── wsgi.py │ └── tox.ini └── toaster-requirements.txt /.b4-config: -------------------------------------------------------------------------------- 1 | [b4] 2 | send-series-to = bitbake-devel@lists.openembedded.org 3 | send-auto-cc-cmd = ./contrib/b4-wrapper-bitbake.py send-auto-cc-cmd 4 | prep-pre-flight-checks = disable-needs-checking 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *min.js binary 2 | *min.css binary 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.pyo 3 | *~ 4 | pyshtables.py 5 | /doc/manual/html/ 6 | /build/ 7 | /bin/bitbakec 8 | *.swp 9 | tags 10 | *.sqlite 11 | venv/ 12 | doc/bitbake-user-manual/bitbake-user-manual.html 13 | doc/bitbake-user-manual/bitbake-user-manual.pdf 14 | doc/bitbake-user-manual/bitbake-user-manual.tgz 15 | lib/toaster/contrib/tts/backlog.txt 16 | lib/toaster/contrib/tts/log/* 17 | lib/toaster/contrib/tts/.cache/* 18 | lib/bb/tests/runqueue-tests/bitbake-cookerdaemon.log 19 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Tim Ansell 2 | Phil Blundell 3 | Seb Frankengul 4 | Holger Freyther 5 | Marcin Juszkiewicz 6 | Chris Larson 7 | Ulrich Luckas 8 | Mickey Lauer 9 | Richard Purdie 10 | Holger Schurig 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BitBake is licensed under the GNU General Public License version 2.0. See 2 | LICENSE.GPL-2.0-only for further details. 3 | 4 | Individual files contain the following style tags instead of the full license text: 5 | 6 | SPDX-License-Identifier: GPL-2.0-only 7 | 8 | This enables machine processing of license information based on the SPDX 9 | License Identifiers that are here available: http://spdx.org/licenses/ 10 | 11 | 12 | The following external components are distributed with this software: 13 | 14 | * The Toaster Simple UI application is based upon the Django project template, the files of which are covered by the BSD license and are copyright (c) Django Software 15 | Foundation and individual contributors. 16 | 17 | * Twitter Bootstrap (including Glyphicons), redistributed under the MIT license 18 | * jQuery is redistributed under the MIT license. 19 | 20 | * Twitter typeahead.js redistributed under the MIT license. Note that the JS source has one small modification, so the full unminified file is currently included to make it obvious where this is. 21 | 22 | * jsrender is redistributed under the MIT license. 23 | 24 | * QUnit is redistributed under the MIT license. 25 | 26 | * Font Awesome fonts redistributed under the SIL Open Font License 1.1 27 | 28 | * simplediff is distributed under the zlib license. 29 | 30 | -------------------------------------------------------------------------------- /LICENSE.MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 17 | SOFTWARE. 18 | 19 | Note: 20 | Individual files contain the following tag instead of the full license text. 21 | 22 | SPDX-License-Identifier: MIT 23 | 24 | This enables machine processing of license information based on the SPDX 25 | License Identifiers that are here available: http://spdx.org/licenses/ 26 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include ChangeLog 2 | include AUTHORS 3 | include LICENSE 4 | include LICENSE.GPL-2.0-only 5 | include LICENSE.MIT 6 | include contrib/* 7 | include contrib/vim/*/* 8 | include conf/* 9 | include classes/* 10 | include doc/* 11 | include doc/manual/* 12 | include ez_setup.py 13 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | How to Report a Potential Vulnerability? 2 | ======================================== 3 | 4 | If you would like to report a public issue (for example, one with a released 5 | CVE number), please report it using the 6 | [https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla]. 7 | If you have a patch ready, submit it following the same procedure as any other 8 | patch as described in README.md. 9 | 10 | If you are dealing with a not-yet released or urgent issue, please send a 11 | message to security AT yoctoproject DOT org, including as many details as 12 | possible: the layer or software module affected, the recipe and its version, 13 | and any example code, if available. 14 | 15 | Branches maintained with security fixes 16 | --------------------------------------- 17 | 18 | See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS] 19 | for detailed info regarding the policies and maintenance of Stable branches. 20 | 21 | The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all 22 | releases of the Yocto Project. Versions in grey are no longer actively maintained with 23 | security patches, but well-tested patches may still be accepted for them for 24 | significant issues. 25 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 2 | - Interfaces 3 | - Add an interactive mode to knotty (similar to the interactive mode we dropped) 4 | - Fix up or drop the ncurses interface? Currently too limited to be useful. 5 | - Concerns about whether teamcity interface works. No testing. 6 | 7 | - Improve exception handling: 8 | - dropping fatal/SystemExit/sys.exit usage in favor of raising 9 | appropriate exceptions 10 | - Audit bb.fatal usage - these should all be able to be replaced with 11 | exceptions 12 | 13 | - Continue pylint / pyflakes / pychecker / pep8 fixups - focus on real issues 14 | or performance issues, not cosmetic ones. 15 | 16 | - Drop os.system usage in favor of direct subprocess usage or a subprocess 17 | wrapper 18 | 19 | - BUG: if you chmod 000 local.conf, it silently doesn't parse it, when it 20 | should really fail, so the user can fix the problem. 21 | 22 | 23 | Long term, high impact: 24 | 25 | - Consider changing the behavior when a variable is referenced and is unset 26 | Today, it evaluates to ${FOO} and then shell has a chance to expand it, but 27 | this is far from ideal. We had considered evaluating it to the empty string, 28 | but that has other potential problems. Frans Meulenbroeks has proposed just 29 | erroring when this occurs, as we can always define default values for the 30 | variables in bitbake.conf. This seems reasonable. My only concern with 31 | that is the case where you want to reference a shell variable with odd 32 | characters in it -- where you'd have to use ${} style shell variable 33 | expansion rather than normal $. To handle that case, we'd really need a 34 | way to escape / disable bitbake variable expansion, \${} perhaps. 35 | 36 | -------------------------------------------------------------------------------- /bin/bitbake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (C) 2003, 2004 Chris Larson 4 | # Copyright (C) 2003, 2004 Phil Blundell 5 | # Copyright (C) 2003 - 2005 Michael 'Mickey' Lauer 6 | # Copyright (C) 2005 Holger Hans Peter Freyther 7 | # Copyright (C) 2005 ROAD GmbH 8 | # Copyright (C) 2006 Richard Purdie 9 | # 10 | # SPDX-License-Identifier: GPL-2.0-only 11 | # 12 | 13 | import os 14 | import sys 15 | import warnings 16 | warnings.simplefilter("default") 17 | 18 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 19 | 'lib')) 20 | try: 21 | import bb 22 | except RuntimeError as exc: 23 | sys.exit(str(exc)) 24 | 25 | from bb import cookerdata 26 | from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException 27 | 28 | bb.utils.check_system_locale() 29 | 30 | __version__ = "2.12.0" 31 | 32 | if __name__ == "__main__": 33 | if __version__ != bb.__version__: 34 | sys.exit("Bitbake core version and program version mismatch!") 35 | try: 36 | sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv), 37 | cookerdata.CookerConfiguration())) 38 | except BBMainException as err: 39 | sys.exit(err) 40 | except bb.BBHandledException: 41 | sys.exit(1) 42 | except Exception: 43 | import traceback 44 | traceback.print_exc() 45 | sys.exit(1) 46 | -------------------------------------------------------------------------------- /bin/bitbake-config-build: -------------------------------------------------------------------------------- 1 | bitbake-layers -------------------------------------------------------------------------------- /bin/bitbake-dumpsig: -------------------------------------------------------------------------------- 1 | bitbake-diffsigs -------------------------------------------------------------------------------- /bin/bitbake-selftest: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (C) 2012 Richard Purdie 4 | # 5 | # SPDX-License-Identifier: GPL-2.0-only 6 | # 7 | 8 | import os 9 | import sys, logging 10 | import warnings 11 | warnings.simplefilter("default") 12 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib')) 13 | 14 | import unittest 15 | try: 16 | import bb 17 | import hashserv 18 | import prserv 19 | import layerindexlib 20 | except RuntimeError as exc: 21 | sys.exit(str(exc)) 22 | 23 | tests = ["bb.tests.codeparser", 24 | "bb.tests.color", 25 | "bb.tests.cooker", 26 | "bb.tests.cow", 27 | "bb.tests.data", 28 | "bb.tests.event", 29 | "bb.tests.fetch", 30 | "bb.tests.parse", 31 | "bb.tests.runqueue", 32 | "bb.tests.siggen", 33 | "bb.tests.utils", 34 | "bb.tests.compression", 35 | "hashserv.tests", 36 | "prserv.tests", 37 | "layerindexlib.tests.layerindexobj", 38 | "layerindexlib.tests.restapi", 39 | "layerindexlib.tests.cooker"] 40 | 41 | for t in tests: 42 | t = '.'.join(t.split('.')[:3]) 43 | __import__(t) 44 | 45 | 46 | # Set-up logging 47 | class StdoutStreamHandler(logging.StreamHandler): 48 | """Special handler so that unittest is able to capture stdout""" 49 | def __init__(self): 50 | # Override __init__() because we don't want to set self.stream here 51 | logging.Handler.__init__(self) 52 | 53 | @property 54 | def stream(self): 55 | # We want to dynamically write wherever sys.stdout is pointing to 56 | return sys.stdout 57 | 58 | 59 | handler = StdoutStreamHandler() 60 | bb.logger.addHandler(handler) 61 | bb.logger.setLevel(logging.DEBUG) 62 | 63 | 64 | ENV_HELP = """\ 65 | Environment variables: 66 | BB_SKIP_NETTESTS set to 'yes' in order to skip tests using network 67 | connection 68 | BB_TMPDIR_NOCLEAN set to 'yes' to preserve test tmp directories 69 | """ 70 | 71 | class main(unittest.main): 72 | def _print_help(self, *args, **kwargs): 73 | super(main, self)._print_help(*args, **kwargs) 74 | print(ENV_HELP) 75 | 76 | 77 | if __name__ == '__main__': 78 | main(defaultTest=tests, buffer=True) 79 | -------------------------------------------------------------------------------- /bin/bitbake-server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # SPDX-License-Identifier: GPL-2.0-only 4 | # 5 | # Copyright (C) 2020 Richard Purdie 6 | # 7 | 8 | import os 9 | import sys 10 | import warnings 11 | warnings.simplefilter("default") 12 | warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*use.of.fork.*may.lead.to.deadlocks.in.the.child.*") 13 | import logging 14 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) 15 | 16 | import bb 17 | 18 | bb.utils.check_system_locale() 19 | 20 | # Users shouldn't be running this code directly 21 | if len(sys.argv) != 11 or not sys.argv[1].startswith("decafbad"): 22 | print("bitbake-server is meant for internal execution by bitbake itself, please don't use it standalone.") 23 | sys.exit(1) 24 | 25 | import bb.server.process 26 | 27 | lockfd = int(sys.argv[2]) 28 | readypipeinfd = int(sys.argv[3]) 29 | logfile = sys.argv[4] 30 | lockname = sys.argv[5] 31 | sockname = sys.argv[6] 32 | timeout = float(sys.argv[7]) 33 | profile = bool(int(sys.argv[8])) 34 | xmlrpcinterface = (sys.argv[9], int(sys.argv[10])) 35 | if xmlrpcinterface[0] == "None": 36 | xmlrpcinterface = (None, xmlrpcinterface[1]) 37 | 38 | # Replace standard fds with our own 39 | with open('/dev/null', 'r') as si: 40 | os.dup2(si.fileno(), sys.stdin.fileno()) 41 | 42 | with open(logfile, 'a+') as so: 43 | os.dup2(so.fileno(), sys.stdout.fileno()) 44 | os.dup2(so.fileno(), sys.stderr.fileno()) 45 | 46 | # Have stdout and stderr be the same so log output matches chronologically 47 | # and there aren't two seperate buffers 48 | sys.stderr = sys.stdout 49 | 50 | logger = logging.getLogger("BitBake") 51 | # Ensure logging messages get sent to the UI as events 52 | handler = bb.event.LogHandler() 53 | logger.addHandler(handler) 54 | 55 | bb.server.process.execServer(lockfd, readypipeinfd, lockname, sockname, timeout, xmlrpcinterface, profile) 56 | 57 | -------------------------------------------------------------------------------- /bin/toaster-eventreplay: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (C) 2014 Alex Damian 4 | # 5 | # SPDX-License-Identifier: GPL-2.0-only 6 | # 7 | # This file re-uses code spread throughout other Bitbake source files. 8 | # As such, all other copyrights belong to their own right holders. 9 | # 10 | 11 | """ 12 | This command takes a filename as a single parameter. The filename is read 13 | as a build eventlog, and the ToasterUI is used to process events in the file 14 | and log data in the database 15 | """ 16 | 17 | import os 18 | import sys 19 | import json 20 | import pickle 21 | import codecs 22 | import warnings 23 | warnings.simplefilter("default") 24 | 25 | from collections import namedtuple 26 | 27 | # mangle syspath to allow easy import of modules 28 | from os.path import join, dirname, abspath 29 | sys.path.insert(0, join(dirname(dirname(abspath(__file__))), 'lib')) 30 | 31 | import bb.cooker 32 | from bb.ui import toasterui 33 | from bb.ui import eventreplay 34 | 35 | def main(argv): 36 | with open(argv[-1]) as eventfile: 37 | # load variables from the first line 38 | variables = None 39 | while line := eventfile.readline().strip(): 40 | try: 41 | variables = json.loads(line)['allvariables'] 42 | break 43 | except (KeyError, json.JSONDecodeError): 44 | continue 45 | if not variables: 46 | sys.exit("Cannot find allvariables entry in event log file %s" % argv[-1]) 47 | eventfile.seek(0) 48 | params = namedtuple('ConfigParams', ['observe_only'])(True) 49 | player = eventreplay.EventPlayer(eventfile, variables) 50 | 51 | return toasterui.main(player, player, params) 52 | 53 | # run toaster ui on our mock bitbake class 54 | if __name__ == "__main__": 55 | if len(sys.argv) != 2: 56 | print("Usage: %s " % os.path.basename(sys.argv[0])) 57 | sys.exit(1) 58 | 59 | sys.exit(main(sys.argv)) 60 | -------------------------------------------------------------------------------- /conf/bitbake.conf: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2003 Chris Larson 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included 11 | # in all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 17 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19 | # OTHER DEALINGS IN THE SOFTWARE. 20 | 21 | B = "${S}" 22 | DEPENDS = "" 23 | DEPLOY_DIR = "${TMPDIR}/deploy" 24 | DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images" 25 | DL_DIR = "${TMPDIR}/downloads" 26 | CACHE = "${TMPDIR}/cache" 27 | FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" 28 | FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}" 29 | IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_" 30 | IMAGE_ROOTFS = "${TMPDIR}/rootfs" 31 | OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}" 32 | P = "${PN}-${PV}" 33 | PERSISTENT_DIR = "${TMPDIR}/cache" 34 | PF = "${PN}-${PV}-${PR}" 35 | PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" 36 | PR = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}" 37 | PROVIDES = "" 38 | PV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" 39 | S = "${WORKDIR}/${P}" 40 | SRC_URI = "file://${FILE}" 41 | STAMP = "${TMPDIR}/stamps/${PF}" 42 | T = "${WORKDIR}/temp" 43 | TARGET_ARCH = "${BUILD_ARCH}" 44 | TMPDIR = "${TOPDIR}/tmp" 45 | WORKDIR = "${TMPDIR}/work/${PF}" 46 | GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}" 47 | -------------------------------------------------------------------------------- /contrib/README: -------------------------------------------------------------------------------- 1 | This directory is for additional contributed files which may be useful. 2 | -------------------------------------------------------------------------------- /contrib/autobuilderlog.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "loggers": { 4 | "BitBake.SigGen.HashEquiv": { 5 | "level": "VERBOSE", 6 | "handlers": ["BitBake.verbconsole"] 7 | }, 8 | "BitBake.RunQueue.HashEquiv": { 9 | "level": "VERBOSE", 10 | "handlers": ["BitBake.verbconsole"] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /contrib/b4-wrapper-bitbake.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright OpenEmbedded Contributors 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | # This script is to be called by b4: 8 | # - through b4.send-auto-cc-cmd with "send-auto-cc-cmd" as first argument, 9 | # 10 | # When send-auto-cc-cmd is passed: 11 | # 12 | # This returns the list of Cc recipients for a patch. 13 | # 14 | # This script takes as stdin a patch. 15 | 16 | import subprocess 17 | import sys 18 | 19 | cmd = sys.argv[1] 20 | if cmd != "send-auto-cc-cmd": 21 | sys.exit(-1) 22 | 23 | patch = sys.stdin.read() 24 | 25 | if subprocess.call(["which", "lsdiff"], stdout=subprocess.DEVNULL) != 0: 26 | print("lsdiff missing from host, please install patchutils") 27 | sys.exit(-1) 28 | 29 | files = subprocess.check_output(["lsdiff", "--strip-match=1", "--strip=1", "--include=doc/*"], 30 | input=patch, text=True) 31 | if len(files): 32 | print("docs@lists.yoctoproject.org") 33 | else: 34 | # Handle patches made with --no-prefix 35 | files = subprocess.check_output(["lsdiff", "--include=doc/*"], 36 | input=patch, text=True) 37 | if len(files): 38 | print("docs@lists.yoctoproject.org") 39 | 40 | sys.exit(0) 41 | -------------------------------------------------------------------------------- /contrib/bbdev.sh: -------------------------------------------------------------------------------- 1 | # This is a shell function to be sourced into your shell or placed in your .profile, 2 | # which makes setting things up for BitBake a bit easier. 3 | # 4 | # The author disclaims copyright to the contents of this file and places it in the 5 | # public domain. 6 | 7 | bbdev () { 8 | local BBDIR PKGDIR BUILDDIR 9 | if test x"$1" = "x--help"; then echo >&2 "syntax: bbdev [bbdir [pkgdir [builddir]]]"; return 1; fi 10 | if test x"$1" = x; then BBDIR=`pwd`; else BBDIR=$1; fi 11 | if test x"$2" = x; then PKGDIR=`pwd`; else PKGDIR=$2; fi 12 | if test x"$3" = x; then BUILDDIR=`pwd`; else BUILDDIR=$3; fi 13 | 14 | BBDIR=`readlink -f $BBDIR` 15 | PKGDIR=`readlink -f $PKGDIR` 16 | BUILDDIR=`readlink -f $BUILDDIR` 17 | if ! (test -d $BBDIR && test -d $PKGDIR && test -d $BUILDDIR); then 18 | echo >&2 "syntax: bbdev [bbdir [pkgdir [builddir]]]" 19 | return 1 20 | fi 21 | 22 | PATH=$BBDIR/bin:$PATH 23 | BBPATH=$BBDIR 24 | if test x"$BBDIR" != x"$PKGDIR"; then 25 | BBPATH=$PKGDIR:$BBPATH 26 | fi 27 | if test x"$PKGDIR" != x"$BUILDDIR"; then 28 | BBPATH=$BUILDDIR:$BBPATH 29 | fi 30 | export BBPATH 31 | } 32 | -------------------------------------------------------------------------------- /contrib/hashserv/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # 3 | # Copyright (c) 2021 Joshua Watt 4 | # 5 | # Dockerfile to build a bitbake hash equivalence server container 6 | # 7 | # From the root of the bitbake repository, run: 8 | # 9 | # docker build -f contrib/hashserv/Dockerfile . 10 | # 11 | 12 | FROM alpine:3.13.1 13 | 14 | RUN apk add --no-cache python3 libgcc 15 | 16 | COPY bin/bitbake-hashserv /opt/bbhashserv/bin/ 17 | COPY lib/hashserv /opt/bbhashserv/lib/hashserv/ 18 | COPY lib/bb /opt/bbhashserv/lib/bb/ 19 | COPY lib/codegen.py /opt/bbhashserv/lib/codegen.py 20 | COPY lib/ply /opt/bbhashserv/lib/ply/ 21 | COPY lib/bs4 /opt/bbhashserv/lib/bs4/ 22 | 23 | ENTRYPOINT ["/opt/bbhashserv/bin/bitbake-hashserv"] 24 | -------------------------------------------------------------------------------- /contrib/prserv/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # 3 | # Copyright (c) 2022 Daniel Gomez 4 | # 5 | # Dockerfile to build a bitbake PR service container 6 | # 7 | # From the root of the bitbake repository, run: 8 | # 9 | # docker build -f contrib/prserv/Dockerfile . -t prserv 10 | # 11 | # Running examples: 12 | # 13 | # 1. PR Service in RW mode, port 18585: 14 | # 15 | # docker run --detach --tty \ 16 | # --env PORT=18585 \ 17 | # --publish 18585:18585 \ 18 | # --volume $PWD:/var/lib/bbprserv \ 19 | # prserv 20 | # 21 | # 2. PR Service in RO mode, default port (8585) and custom LOGFILE: 22 | # 23 | # docker run --detach --tty \ 24 | # --env DBMODE="--read-only" \ 25 | # --env LOGFILE=/var/lib/bbprserv/prservro.log \ 26 | # --publish 8585:8585 \ 27 | # --volume $PWD:/var/lib/bbprserv \ 28 | # prserv 29 | # 30 | 31 | FROM alpine:3.14.4 32 | 33 | RUN apk add --no-cache python3 34 | 35 | COPY bin/bitbake-prserv /opt/bbprserv/bin/ 36 | COPY lib/prserv /opt/bbprserv/lib/prserv/ 37 | COPY lib/bb /opt/bbprserv/lib/bb/ 38 | COPY lib/codegen.py /opt/bbprserv/lib/codegen.py 39 | COPY lib/ply /opt/bbprserv/lib/ply/ 40 | COPY lib/bs4 /opt/bbprserv/lib/bs4/ 41 | 42 | ENV PATH=$PATH:/opt/bbprserv/bin 43 | 44 | RUN mkdir -p /var/lib/bbprserv 45 | 46 | ENV DBFILE=/var/lib/bbprserv/prserv.sqlite3 \ 47 | LOGFILE=/var/lib/bbprserv/prserv.log \ 48 | LOGLEVEL=debug \ 49 | HOST=0.0.0.0 \ 50 | PORT=8585 \ 51 | DBMODE="" 52 | 53 | ENTRYPOINT [ "/bin/sh", "-c", \ 54 | "bitbake-prserv \ 55 | --file=$DBFILE \ 56 | --log=$LOGFILE \ 57 | --loglevel=$LOGLEVEL \ 58 | --start \ 59 | --host=$HOST \ 60 | --port=$PORT \ 61 | $DBMODE \ 62 | && tail -f $LOGFILE"] 63 | -------------------------------------------------------------------------------- /contrib/vim/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /contrib/vim/ftdetect/bitbake.vim: -------------------------------------------------------------------------------- 1 | " Vim filetype detection file 2 | " Language: BitBake 3 | " Author: Ricardo Salveti 4 | " Copyright: Copyright (C) 2008 Ricardo Salveti 5 | " Licence: You may redistribute this under the same terms as Vim itself 6 | " 7 | " This sets up the syntax highlighting for BitBake files, like .bb, .bbclass and .inc 8 | 9 | if &compatible || version < 600 || exists("b:loaded_bitbake_plugin") 10 | finish 11 | endif 12 | 13 | " .bb, .bbappend and .bbclass 14 | au BufNewFile,BufRead *.{bb,bbappend,bbclass} setfiletype bitbake 15 | 16 | " .inc -- meanwhile included upstream 17 | if !has("patch-9.0.0055") 18 | au BufNewFile,BufRead *.inc call s:BBIncDetect() 19 | def s:BBIncDetect() 20 | l:lines = getline(1) .. getline(2) .. getline(3) 21 | if l:lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= ' 22 | set filetype bitbake 23 | endif 24 | enddef 25 | endif 26 | 27 | " .conf 28 | au BufNewFile,BufRead *.conf 29 | \ if (match(expand("%:p:h"), "conf") > 0) | 30 | \ set filetype=bitbake | 31 | \ endif 32 | 33 | -------------------------------------------------------------------------------- /contrib/vim/ftplugin/bitbake.vim: -------------------------------------------------------------------------------- 1 | " Only do this when not done yet for this buffer 2 | if exists("b:did_ftplugin") 3 | finish 4 | endif 5 | 6 | " Don't load another plugin for this buffer 7 | let b:did_ftplugin = 1 8 | 9 | let b:undo_ftplugin = "setl cms< sts< sw< et< sua<" 10 | 11 | setlocal commentstring=#\ %s 12 | setlocal softtabstop=4 shiftwidth=4 expandtab 13 | setlocal suffixesadd+=.bb,.bbclass 14 | -------------------------------------------------------------------------------- /contrib/vim/plugin/newbbappend.vim: -------------------------------------------------------------------------------- 1 | " Vim plugin file 2 | " Purpose: Create a template for new bbappend file 3 | " Author: Joshua Watt 4 | " Copyright: Copyright (C) 2017 Joshua Watt 5 | " 6 | " This file is licensed under the MIT license, see COPYING.MIT in 7 | " this source distribution for the terms. 8 | " 9 | 10 | if &compatible || v:version < 600 || exists("b:loaded_bitbake_plugin") 11 | finish 12 | endif 13 | 14 | fun! NewBBAppendTemplate() 15 | if line2byte(line('$') + 1) != -1 16 | return 17 | endif 18 | 19 | let l:paste = &paste 20 | set nopaste 21 | 22 | " New bbappend template 23 | 0 put ='FILESEXTRAPATHS:prepend := \"${THISDIR}/${PN}:\"' 24 | 2 25 | 26 | if paste == 1 27 | set paste 28 | endif 29 | endfun 30 | 31 | if !exists("g:bb_create_on_empty") 32 | let g:bb_create_on_empty = 1 33 | endif 34 | 35 | " disable in case of vimdiff 36 | if v:progname =~ "vimdiff" 37 | let g:bb_create_on_empty = 0 38 | endif 39 | 40 | augroup NewBBAppend 41 | au BufNewFile,BufReadPost *.bbappend 42 | \ if g:bb_create_on_empty | 43 | \ call NewBBAppendTemplate() | 44 | \ endif 45 | augroup END 46 | 47 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | _build/ 2 | -------------------------------------------------------------------------------- /doc/COPYING.MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all 9 | copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 14 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 17 | THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= -W --keep-going -j auto 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | DESTDIR = final 11 | 12 | ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0) 13 | $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed") 14 | endif 15 | 16 | # Put it first so that "make" without argument is like "make help". 17 | help: 18 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 19 | 20 | .PHONY: help Makefile clean publish 21 | 22 | publish: Makefile html singlehtml 23 | rm -rf $(BUILDDIR)/$(DESTDIR)/ 24 | mkdir -p $(BUILDDIR)/$(DESTDIR)/ 25 | cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/ 26 | cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html 27 | sed -i -e 's@index.html#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html 28 | 29 | clean: 30 | @rm -rf $(BUILDDIR) 31 | 32 | # Catch-all target: route all unknown targets to Sphinx using the new 33 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 34 | %: Makefile 35 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 36 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | Documentation 2 | ============= 3 | 4 | This is the directory that contains the BitBake documentation. 5 | 6 | Manual Organization 7 | =================== 8 | 9 | Folders exist for individual manuals as follows: 10 | 11 | * bitbake-user-manual --- The BitBake User Manual 12 | 13 | Each folder is self-contained regarding content and figures. 14 | 15 | If you want to find HTML versions of the BitBake manuals on the web, 16 | go to https://www.openembedded.org/wiki/Documentation. 17 | 18 | Sphinx 19 | ====== 20 | 21 | The BitBake documentation was migrated from the original DocBook 22 | format to Sphinx based documentation for the Yocto Project 3.2 23 | release. 24 | 25 | Additional information related to the Sphinx migration, and guidelines 26 | for developers willing to contribute to the BitBake documentation can 27 | be found in the Yocto Project Documentation README file: 28 | 29 | https://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/tree/documentation/README 30 | 31 | How to build the Yocto Project documentation 32 | ============================================ 33 | 34 | Sphinx is written in Python. While it might work with Python2, for 35 | obvious reasons, we will only support building the BitBake 36 | documentation with Python3. 37 | 38 | Sphinx might be available in your Linux distro packages repositories, 39 | however it is not recommend using distro packages, as they might be 40 | old versions, especially if you are using an LTS version of your 41 | distro. The recommended method to install Sphinx and all required 42 | dependencies is to use the Python Package Index (pip). 43 | 44 | To install all required packages run: 45 | 46 | $ pip3 install sphinx sphinx_rtd_theme pyyaml 47 | 48 | To build the documentation locally, run: 49 | 50 | $ cd doc 51 | $ make html 52 | 53 | The resulting HTML index page will be _build/html/index.html, and you 54 | can browse your own copy of the locally generated documentation with 55 | your browser. 56 | -------------------------------------------------------------------------------- /doc/_templates/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {% extends "!breadcrumbs.html" %} 2 | 3 | {% block breadcrumbs %} 4 |
  • 5 | {{ doctype or 'single' }} 6 | {{ release }} 7 |
  • 8 |
  • »
  • 9 | {% for doc in parents %} 10 |
  • {{ doc.title }} »
  • 11 | {% endfor %} 12 |
  • {{ title }}
  • 13 | {% endblock %} 14 | 15 | -------------------------------------------------------------------------------- /doc/_templates/footer.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    © Copyright {{ copyright }} 5 |
    Last updated on {{ last_updated }} from the bitbake git repository. 6 |

    7 |
    8 |
    9 | 10 | -------------------------------------------------------------------------------- /doc/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {% block extrabody %} 4 |
    5 |
    6 | {% endblock %} 7 | 8 | -------------------------------------------------------------------------------- /doc/bitbake-user-manual/bitbake-user-manual-library-functions.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-License-Identifier: CC-BY-2.5 2 | 3 | ================= 4 | Library Functions 5 | ================= 6 | 7 | | 8 | 9 | This chapter lists common library functions available under the ``lib/`` 10 | directory in BitBake. 11 | 12 | These functions can be used in recipes or configuration files with 13 | :ref:`inline-Python ` or :ref:`Python 15 | ` functions. 17 | 18 | Logging utilities 19 | ================= 20 | 21 | Different logging utilities can be used from Python code in recipes or 22 | configuration files. 23 | 24 | The strings passed below can be formatted with ``str.format()``, for example:: 25 | 26 | bb.warn("Houston, we have a %s", "bit of a problem") 27 | 28 | Formatted string can also be used directly:: 29 | 30 | bb.error("%s, we have a %s" % ("Houston", "big problem")) 31 | 32 | Python f-strings may also be used:: 33 | 34 | h = "Houston" 35 | bb.fatal(f"{h}, we have a critical problem") 36 | 37 | .. automodule:: bb 38 | :members: 39 | debug, 40 | error, 41 | erroronce, 42 | fatal, 43 | note, 44 | plain, 45 | verbnote, 46 | warn, 47 | warnonce, 48 | 49 | ``bb.utils`` 50 | ============ 51 | 52 | .. automodule:: bb.utils 53 | :members: 54 | :exclude-members: 55 | LogCatcher, 56 | PrCtlError, 57 | VersionStringException, 58 | better_compile, 59 | better_exec, 60 | -------------------------------------------------------------------------------- /doc/bitbake-user-manual/figures/bb_multiconfig_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/doc/bitbake-user-manual/figures/bb_multiconfig_files.png -------------------------------------------------------------------------------- /doc/bitbake-user-manual/figures/bitbake-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/doc/bitbake-user-manual/figures/bitbake-title.png -------------------------------------------------------------------------------- /doc/genindex.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | Index 3 | ===== 4 | -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-License-Identifier: CC-BY-2.5 2 | 3 | =================== 4 | BitBake User Manual 5 | =================== 6 | 7 | | 8 | 9 | .. toctree:: 10 | :caption: Table of Contents 11 | :numbered: 12 | 13 | bitbake-user-manual/bitbake-user-manual-intro 14 | bitbake-user-manual/bitbake-user-manual-execution 15 | bitbake-user-manual/bitbake-user-manual-metadata 16 | bitbake-user-manual/bitbake-user-manual-ref-variables-context 17 | bitbake-user-manual/bitbake-user-manual-fetching 18 | bitbake-user-manual/bitbake-user-manual-ref-variables 19 | bitbake-user-manual/bitbake-user-manual-library-functions 20 | bitbake-user-manual/bitbake-user-manual-hello 21 | 22 | .. toctree:: 23 | :maxdepth: 1 24 | :hidden: 25 | 26 | genindex 27 | releases 28 | 29 | ---- 30 | 31 | .. include:: 32 | 33 | | BitBake Community 34 | | Copyright |copy| |copyright| 35 | | 36 | 37 | This work is licensed under the Creative Commons Attribution License. To view a 38 | copy of this license, visit http://creativecommons.org/licenses/by/2.5/ or send 39 | a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, 40 | California 94041, USA. 41 | -------------------------------------------------------------------------------- /doc/template/Vera.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/doc/template/Vera.ttf -------------------------------------------------------------------------------- /doc/template/VeraMoBd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/doc/template/VeraMoBd.ttf -------------------------------------------------------------------------------- /doc/template/VeraMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/doc/template/VeraMono.ttf -------------------------------------------------------------------------------- /doc/template/draft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/doc/template/draft.png -------------------------------------------------------------------------------- /lib/bb/asyncrpc/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright BitBake Contributors 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | 8 | from .client import AsyncClient, Client 9 | from .serv import AsyncServer, AsyncServerConnection 10 | from .connection import DEFAULT_MAX_CHUNK 11 | from .exceptions import ( 12 | ClientError, 13 | ServerError, 14 | ConnectionClosedError, 15 | InvokeError, 16 | ) 17 | -------------------------------------------------------------------------------- /lib/bb/asyncrpc/exceptions.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright BitBake Contributors 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | 8 | class ClientError(Exception): 9 | pass 10 | 11 | 12 | class InvokeError(Exception): 13 | pass 14 | 15 | 16 | class ServerError(Exception): 17 | pass 18 | 19 | 20 | class ConnectionClosedError(Exception): 21 | pass 22 | -------------------------------------------------------------------------------- /lib/bb/compress/lz4.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright BitBake Contributors 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | import bb.compress._pipecompress 8 | 9 | 10 | def open(*args, **kwargs): 11 | return bb.compress._pipecompress.open_wrap(LZ4File, *args, **kwargs) 12 | 13 | 14 | class LZ4File(bb.compress._pipecompress.PipeFile): 15 | def get_compress(self): 16 | return ["lz4", "-z", "-c"] 17 | 18 | def get_decompress(self): 19 | return ["lz4", "-d", "-c"] 20 | -------------------------------------------------------------------------------- /lib/bb/compress/zstd.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright BitBake Contributors 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | import bb.compress._pipecompress 8 | import shutil 9 | 10 | 11 | def open(*args, **kwargs): 12 | return bb.compress._pipecompress.open_wrap(ZstdFile, *args, **kwargs) 13 | 14 | 15 | class ZstdFile(bb.compress._pipecompress.PipeFile): 16 | def __init__(self, *args, num_threads=1, compresslevel=3, **kwargs): 17 | self.num_threads = num_threads 18 | self.compresslevel = compresslevel 19 | super().__init__(*args, **kwargs) 20 | 21 | def _get_zstd(self): 22 | if self.num_threads == 1 or not shutil.which("pzstd"): 23 | return ["zstd"] 24 | return ["pzstd", "-p", "%d" % self.num_threads] 25 | 26 | def get_compress(self): 27 | return self._get_zstd() + ["-c", "-%d" % self.compresslevel] 28 | 29 | def get_decompress(self): 30 | return self._get_zstd() + ["-d", "-c"] 31 | -------------------------------------------------------------------------------- /lib/bb/methodpool.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2006 Holger Hans Peter Freyther 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | from bb.utils import better_compile, better_exec 8 | 9 | def insert_method(modulename, code, fn, lineno): 10 | """ 11 | Add code of a module should be added. The methods 12 | will be simply added, no checking will be done 13 | """ 14 | comp = better_compile(code, modulename, fn, lineno=lineno) 15 | better_exec(comp, None, code, fn) 16 | 17 | compilecache = {} 18 | 19 | def compile_cache(code): 20 | h = hash(code) 21 | if h in compilecache: 22 | return compilecache[h] 23 | return None 24 | 25 | def compile_cache_add(code, compileobj): 26 | h = hash(code) 27 | compilecache[h] = compileobj 28 | -------------------------------------------------------------------------------- /lib/bb/parse/parse_py/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | BitBake Parsers 3 | 4 | File parsers for the BitBake build tools. 5 | 6 | """ 7 | 8 | # Copyright (C) 2003, 2004 Chris Larson 9 | # Copyright (C) 2003, 2004 Phil Blundell 10 | # 11 | # SPDX-License-Identifier: GPL-2.0-only 12 | # 13 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig 14 | # 15 | 16 | from __future__ import absolute_import 17 | from . import ConfHandler 18 | from . import BBHandler 19 | 20 | __version__ = '1.0' 21 | -------------------------------------------------------------------------------- /lib/bb/pysh/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/pysh/__init__.py -------------------------------------------------------------------------------- /lib/bb/pysh/sherrors.py: -------------------------------------------------------------------------------- 1 | # sherrors.py - shell errors and signals 2 | # 3 | # Copyright 2007 Patrick Mezard 4 | # 5 | # This software may be used and distributed according to the terms 6 | # of the GNU General Public License, incorporated herein by reference. 7 | 8 | """Define shell exceptions and error codes. 9 | """ 10 | 11 | class ShellError(Exception): 12 | pass 13 | 14 | class ShellSyntaxError(ShellError): 15 | pass 16 | -------------------------------------------------------------------------------- /lib/bb/remotedata.py: -------------------------------------------------------------------------------- 1 | """ 2 | BitBake 'remotedata' module 3 | 4 | Provides support for using a datastore from the bitbake client 5 | """ 6 | 7 | # Copyright (C) 2016 Intel Corporation 8 | # 9 | # SPDX-License-Identifier: GPL-2.0-only 10 | # 11 | 12 | import bb.data 13 | 14 | class RemoteDatastores: 15 | """Used on the server side to manage references to server-side datastores""" 16 | def __init__(self, cooker): 17 | self.cooker = cooker 18 | self.datastores = {} 19 | self.locked = [] 20 | self.datastores[0] = self.cooker.data 21 | self.nextindex = 1 22 | 23 | def __len__(self): 24 | return len(self.datastores) 25 | 26 | def __getitem__(self, key): 27 | # Cooker could have changed its datastore from under us 28 | self.datastores[0] = self.cooker.data 29 | return self.datastores[key] 30 | 31 | def items(self): 32 | return self.datastores.items() 33 | 34 | def store(self, d, locked=False): 35 | """ 36 | Put a datastore into the collection. If locked=True then the datastore 37 | is understood to be managed externally and cannot be released by calling 38 | release(). 39 | """ 40 | idx = self.nextindex 41 | self.datastores[idx] = d 42 | if locked: 43 | self.locked.append(idx) 44 | self.nextindex += 1 45 | return idx 46 | 47 | def check_store(self, d, locked=False): 48 | """ 49 | Put a datastore into the collection if it's not already in there; 50 | in either case return the index 51 | """ 52 | for key, val in self.datastores.items(): 53 | if val is d: 54 | idx = key 55 | break 56 | else: 57 | idx = self.store(d, locked) 58 | return idx 59 | 60 | def release(self, idx): 61 | """Discard a datastore in the collection""" 62 | if idx in self.locked: 63 | raise Exception('Tried to release locked datastore %d' % idx) 64 | del self.datastores[idx] 65 | 66 | -------------------------------------------------------------------------------- /lib/bb/server/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake Base Server Code 3 | # 4 | # Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer 5 | # Copyright (C) 2006 - 2008 Richard Purdie 6 | # Copyright (C) 2013 Alexandru Damian 7 | # 8 | # SPDX-License-Identifier: GPL-2.0-only 9 | # 10 | -------------------------------------------------------------------------------- /lib/bb/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/tests/__init__.py -------------------------------------------------------------------------------- /lib/bb/tests/fetch-testdata/downloads/enchant/1.6.0/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Index of /downloads/enchant/1.6.0 5 | 6 | 7 |

    Index of /downloads/enchant/1.6.0

    8 | 9 | 10 | 11 | 12 | 13 |
    [ICO]NameLast modifiedSizeDescription

    [DIR]Parent Directory  -  
    [   ]MD5SUM01-Apr-2010 23:03 55  
    [   ]enchant-1.6.0.tar.gz01-Apr-2010 23:02 593K 

    14 |
    Apache/2.2.15 (Fedora) Server at www.abisource.com Port 443
    15 | 16 | -------------------------------------------------------------------------------- /lib/bb/tests/fetch-testdata/pub/linux/utils/util-linux/v2.35/index.html: -------------------------------------------------------------------------------- 1 | 2 | Index of /pub/linux/utils/util-linux/v2.35/ 3 | 4 |

    Index of /pub/linux/utils/util-linux/v2.35/


    ../
     5 | libblkid-docs/                                     11-Dec-2019 10:04       -
     6 | libfdisk-docs/                                     11-Dec-2019 10:05       -
     7 | libmount-docs/                                     11-Dec-2019 10:05       -
     8 | libsmartcols-docs/                                 11-Dec-2019 10:05       -
     9 | sha256sums.asc                                     11-Dec-2019 10:11    1242
    10 | util-linux-2.35-rc1.tar.gz                         11-Dec-2019 10:06     10M
    11 | util-linux-2.35-rc1.tar.sign                       11-Dec-2019 10:06     833
    12 | util-linux-2.35-rc1.tar.xz                         11-Dec-2019 10:06      5M
    13 | v2.35-ReleaseNotes                                 11-Dec-2019 10:06     21K
    14 | v2.35-ReleaseNotes.sign                            11-Dec-2019 10:06     833
    15 | v2.35-rc1-ChangeLog                                11-Dec-2019 10:06    228K
    16 | v2.35-rc1-ChangeLog.sign                           11-Dec-2019 10:06     833
    17 | 

    18 | 19 | -------------------------------------------------------------------------------- /lib/bb/tests/fetch-testdata/releases/eglibc/index.html: -------------------------------------------------------------------------------- 1 | 2 | Index of /releases/eglibc/ 3 | 4 |

    Index of /releases/eglibc/


    ../
     5 | eglibc-2.16-svnr21224.tar.bz2                      17-Oct-2012 18:01            17310656
     6 | eglibc-2.16-svnr21224.tar.bz2.md5                  17-Oct-2012 21:53                  64
     7 | eglibc-2.16-svnr21224.tar.bz2.sha1                 17-Oct-2012 21:53                  72
     8 | eglibc-2.17-svnr22064.tar.bz2                      04-Jan-2013 05:44            17565519
     9 | eglibc-2.17-svnr22064.tar.bz2.asc                  04-Jan-2013 05:45                 302
    10 | eglibc-2.17-svnr22064.tar.bz2.md5                  04-Jan-2013 05:44                  64
    11 | eglibc-2.17-svnr22064.tar.bz2.sha1                 04-Jan-2013 05:44                  72
    12 | eglibc-2.18-svnr23787.tar.bz2                      21-Aug-2013 05:36            17862773
    13 | eglibc-2.18-svnr23787.tar.bz2.asc                  21-Aug-2013 05:36                 302
    14 | eglibc-2.18-svnr23787.tar.bz2.md5                  21-Aug-2013 05:36                  64
    15 | eglibc-2.18-svnr23787.tar.bz2.sha1                 21-Aug-2013 05:36                  72
    16 | eglibc-2.19-svnr25243.tar.bz2                      08-Feb-2014 10:06            18873620
    17 | eglibc-2.19-svnr25243.tar.bz2.asc                  08-Feb-2014 10:06                 285
    18 | eglibc-2.19-svnr25243.tar.bz2.md5                  08-Feb-2014 10:06                  64
    19 | eglibc-2.19-svnr25243.tar.bz2.sha1                 08-Feb-2014 10:06                  72
    20 | 

    21 | 22 | -------------------------------------------------------------------------------- /lib/bb/tests/fetch-testdata/releases/gnu-config/index.html: -------------------------------------------------------------------------------- 1 | 2 | Index of /releases/gnu-config/ 3 | 4 |

    Index of /releases/gnu-config/


    ../
     5 | SHA256SUM                                          03-Oct-2012 17:23                 190
     6 | gnu-config-20120814.tar.bz2                        18-Sep-2012 09:28               43026
     7 | gnu-config-yocto-20111111.tgz                      08-May-2012 21:11               48762
     8 | 

    9 | 10 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/classes/image.bbclass: -------------------------------------------------------------------------------- 1 | do_rootfs[recrdeptask] += "do_package_write_deb do_package_qa" 2 | do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa" 3 | do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa 4 | do_rootfs[recrdeptask] += "do_packagedata" 5 | do_rootfs[recrdeptask] += "do_populate_lic" 6 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/classes/native.bbclass: -------------------------------------------------------------------------------- 1 | RECIPERDEPTASK = "do_populate_sysroot" 2 | do_populate_sysroot[rdeptask] = "${RECIPERDEPTASK}" 3 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/conf/bitbake.conf: -------------------------------------------------------------------------------- 1 | CACHE = "${TOPDIR}/cache" 2 | THISDIR = "${@os.path.dirname(d.getVar('FILE'))}" 3 | COREBASE := "${@os.path.normpath(os.path.dirname(d.getVar('FILE')+'/../../'))}" 4 | EXTRA_BBFILES ?= "" 5 | BBFILES = "${COREBASE}/recipes/*.bb ${EXTRA_BBFILES}" 6 | PROVIDES = "${PN}" 7 | PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0]}" 8 | PF = "${BB_CURRENT_MC}:${PN}" 9 | export PATH 10 | TMPDIR ??= "${TOPDIR}" 11 | STAMP = "${TMPDIR}/stamps/${PN}" 12 | T = "${TMPDIR}/workdir/${PN}/temp" 13 | BB_NUMBER_THREADS = "4" 14 | 15 | BB_BASEHASH_IGNORE_VARS = "BB_CURRENT_MC BB_HASHSERVE TMPDIR TOPDIR SLOWTASKS SSTATEVALID FILE BB_CURRENTTASK" 16 | 17 | include conf/multiconfig/${BB_CURRENT_MC}.conf 18 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/conf/multiconfig/mc-1.conf: -------------------------------------------------------------------------------- 1 | TMPDIR = "${TOPDIR}/mc1/" 2 | BBMASK += "recipes/fails-mc/fails-mc1.bb" 3 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/conf/multiconfig/mc_2.conf: -------------------------------------------------------------------------------- 1 | TMPDIR = "${TOPDIR}/mc2/" 2 | BBMASK += "recipes/fails-mc/fails-mc2.bb" 3 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/a1.bb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/tests/runqueue-tests/recipes/a1.bb -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/b1.bb: -------------------------------------------------------------------------------- 1 | DEPENDS = "a1" -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/c1.bb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/tests/runqueue-tests/recipes/c1.bb -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/d1.bb: -------------------------------------------------------------------------------- 1 | DEPENDS = "a1" 2 | 3 | do_package_setscene[depends] = "a1:do_populate_sysroot_setscene" 4 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/e1.bb: -------------------------------------------------------------------------------- 1 | DEPENDS = "b1" -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/f1.bb: -------------------------------------------------------------------------------- 1 | do_install[mcdepends] = "mc:mc-1:mc_2:a1:do_build" 2 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/fails-mc/fails-mc1.bb: -------------------------------------------------------------------------------- 1 | python () { 2 | if d.getVar("BB_CURRENT_MC") == "mc-1": 3 | bb.fatal("Multiconfig is mc-1") 4 | } 5 | 6 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/fails-mc/fails-mc2.bb: -------------------------------------------------------------------------------- 1 | python () { 2 | if d.getVar("BB_CURRENT_MC") == "mc_2": 3 | bb.fatal("Multiconfig is mc_2") 4 | } 5 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/g1.bb: -------------------------------------------------------------------------------- 1 | do_build[mcdepends] = "mc::mc-1:h1:do_invalid" 2 | 3 | -------------------------------------------------------------------------------- /lib/bb/tests/runqueue-tests/recipes/h1.bb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/tests/runqueue-tests/recipes/h1.bb -------------------------------------------------------------------------------- /lib/bb/tests/siggen.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake Test for lib/bb/siggen.py 3 | # 4 | # Copyright (C) 2020 Jean-François Dagenais 5 | # 6 | # SPDX-License-Identifier: GPL-2.0-only 7 | # 8 | 9 | import unittest 10 | import logging 11 | import bb 12 | import time 13 | 14 | logger = logging.getLogger('BitBake.TestSiggen') 15 | 16 | import bb.siggen 17 | 18 | class SiggenTest(unittest.TestCase): 19 | 20 | def test_build_pnid(self): 21 | tests = { 22 | ('', 'helloworld', 'do_sometask') : 'helloworld:do_sometask', 23 | ('XX', 'helloworld', 'do_sometask') : 'mc:XX:helloworld:do_sometask', 24 | } 25 | 26 | for t in tests: 27 | self.assertEqual(bb.siggen.build_pnid(*t), tests[t]) 28 | 29 | -------------------------------------------------------------------------------- /lib/bb/tests/support/httpserver.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: MIT 3 | # 4 | 5 | import http.server 6 | import multiprocessing 7 | import os 8 | import traceback 9 | import signal 10 | import logging 11 | from socketserver import ThreadingMixIn 12 | 13 | class HTTPServer(ThreadingMixIn, http.server.HTTPServer): 14 | 15 | def server_start(self, root_dir, logger): 16 | os.chdir(root_dir) 17 | self.serve_forever() 18 | 19 | class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler): 20 | 21 | def log_message(self, format_str, *args): 22 | pass 23 | 24 | class HTTPService(object): 25 | 26 | def __init__(self, root_dir, host='', port=0, logger=None): 27 | self.root_dir = root_dir 28 | self.host = host 29 | self.port = port 30 | if not logger: 31 | logger = logging.getLogger() 32 | self.logger = logger 33 | 34 | def start(self): 35 | print(self.root_dir) 36 | if not os.path.exists(self.root_dir): 37 | self.logger.info("Not starting HTTPService for directory %s which doesn't exist" % (self.root_dir)) 38 | return 39 | 40 | self.server = HTTPServer((self.host, self.port), HTTPRequestHandler) 41 | if self.port == 0: 42 | self.port = self.server.server_port 43 | self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir, self.logger]) 44 | 45 | # The signal handler from testimage.bbclass can cause deadlocks here 46 | # if the HTTPServer is terminated before it can restore the standard 47 | #signal behaviour 48 | orig = signal.getsignal(signal.SIGTERM) 49 | signal.signal(signal.SIGTERM, signal.SIG_DFL) 50 | self.process.start() 51 | signal.signal(signal.SIGTERM, orig) 52 | 53 | if self.logger: 54 | self.logger.info("Started HTTPService on %s:%s" % (self.host, self.port)) 55 | 56 | 57 | def stop(self): 58 | if hasattr(self, "server"): 59 | self.server.server_close() 60 | if hasattr(self, "process"): 61 | self.process.terminate() 62 | self.process.join() 63 | if self.logger: 64 | self.logger.info("Stopped HTTPService on %s:%s" % (self.host, self.port)) 65 | 66 | -------------------------------------------------------------------------------- /lib/bb/ui/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake UI Implementation 3 | # 4 | # Copyright (C) 2006-2007 Richard Purdie 5 | # 6 | # SPDX-License-Identifier: GPL-2.0-only 7 | # 8 | -------------------------------------------------------------------------------- /lib/bb/ui/icons/images/images_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/images/images_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/images/images_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/images/images_hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/add-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/add-hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/add.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/alert.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/confirmation.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/denied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/denied.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/error.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/info.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/issues.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/issues.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/refresh.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/remove-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/remove-hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/remove.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/indicators/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/indicators/tick.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/info/info_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/info/info_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/info/info_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/info/info_hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/layers/layers_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/layers/layers_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/layers/layers_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/layers/layers_hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/packages/packages_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/packages/packages_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/packages/packages_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/packages/packages_hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/recipe/recipe_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/recipe/recipe_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/recipe/recipe_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/recipe/recipe_hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/settings/settings_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/settings/settings_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/settings/settings_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/settings/settings_hover.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/templates/templates_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/templates/templates_display.png -------------------------------------------------------------------------------- /lib/bb/ui/icons/templates/templates_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bb/ui/icons/templates/templates_hover.png -------------------------------------------------------------------------------- /lib/bblayers/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright BitBake Contributors 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | from pkgutil import extend_path 8 | __path__ = extend_path(__path__, __name__) 9 | -------------------------------------------------------------------------------- /lib/bblayers/common.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright BitBake Contributors 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | import argparse 8 | import logging 9 | import os 10 | 11 | logger = logging.getLogger('bitbake-layers') 12 | 13 | 14 | class LayerPlugin(): 15 | def __init__(self): 16 | self.tinfoil = None 17 | self.bblayers = [] 18 | 19 | def tinfoil_init(self, tinfoil): 20 | self.tinfoil = tinfoil 21 | self.bblayers = (self.tinfoil.config_data.getVar('BBLAYERS') or "").split() 22 | layerconfs = self.tinfoil.config_data.varhistory.get_variable_items_files('BBFILE_COLLECTIONS') 23 | self.bbfile_collections = {layer: os.path.dirname(os.path.dirname(path)) for layer, path in layerconfs.items()} 24 | 25 | @staticmethod 26 | def add_command(subparsers, cmdname, function, parserecipes=True, *args, **kwargs): 27 | """Convert docstring for function to help.""" 28 | docsplit = function.__doc__.splitlines() 29 | help = docsplit[0] 30 | if len(docsplit) > 1: 31 | desc = '\n'.join(docsplit[1:]) 32 | else: 33 | desc = help 34 | subparser = subparsers.add_parser(cmdname, *args, help=help, description=desc, formatter_class=argparse.RawTextHelpFormatter, **kwargs) 35 | subparser.set_defaults(func=function, parserecipes=parserecipes) 36 | return subparser 37 | 38 | def get_layer_name(self, layerdir): 39 | return os.path.basename(layerdir.rstrip(os.sep)) 40 | -------------------------------------------------------------------------------- /lib/bs4/AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/bs4/AUTHORS -------------------------------------------------------------------------------- /lib/bs4/LICENSE: -------------------------------------------------------------------------------- 1 | Beautiful Soup is made available under the MIT license: 2 | 3 | Copyright (c) Leonard Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 21 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | Beautiful Soup incorporates code from the html5lib library, which is 26 | also made available under the MIT license. Copyright (c) James Graham 27 | and other contributors 28 | 29 | Beautiful Soup has an optional dependency on the soupsieve library, 30 | which is also made available under the MIT license. Copyright (c) 31 | Isaac Muse 32 | -------------------------------------------------------------------------------- /lib/layerindexlib/README: -------------------------------------------------------------------------------- 1 | The layerindexlib module is designed to permit programs to work directly 2 | with layer index information. (See layers.openembedded.org...) 3 | 4 | The layerindexlib module includes a plugin interface that is used to extend 5 | the basic functionality. There are two primary plugins available: restapi 6 | and cooker. 7 | 8 | The restapi plugin works with a web based REST Api compatible with the 9 | layerindex-web project, as well as the ability to store and retried a 10 | the information for one or more files on the disk. 11 | 12 | The cooker plugin works by reading the information from the current build 13 | project and processing it as if it were a layer index. 14 | 15 | 16 | TODO: 17 | 18 | __init__.py: 19 | Implement local on-disk caching (using the rest api store/load) 20 | Implement layer index style query operations on a combined index 21 | 22 | common.py: 23 | Stop network access if BB_NO_NETWORK or allowed hosts is restricted 24 | 25 | cooker.py: 26 | Cooker - Implement recipe parsing 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/layerindexlib/plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016-2018 Wind River Systems, Inc. 2 | # 3 | # SPDX-License-Identifier: GPL-2.0-only 4 | # 5 | # The file contains: 6 | # LayerIndex exceptions 7 | # Plugin base class 8 | # Utility Functions for working on layerindex data 9 | 10 | import logging 11 | 12 | logger = logging.getLogger('BitBake.layerindexlib.plugin') 13 | 14 | class LayerIndexPluginException(Exception): 15 | """LayerIndex Generic Exception""" 16 | def __init__(self, message): 17 | self.msg = message 18 | Exception.__init__(self, message) 19 | 20 | def __str__(self): 21 | return self.msg 22 | 23 | class LayerIndexPluginUrlError(LayerIndexPluginException): 24 | """Exception raised when a plugin does not support a given URL type""" 25 | def __init__(self, plugin, url): 26 | msg = "%s does not support %s:" % (plugin, url) 27 | self.plugin = plugin 28 | self.url = url 29 | LayerIndexPluginException.__init__(self, msg) 30 | 31 | class IndexPlugin(): 32 | def __init__(self): 33 | self.type = None 34 | 35 | def init(self, layerindex): 36 | self.layerindex = layerindex 37 | 38 | def plugin_type(self): 39 | return self.type 40 | 41 | def load_index(self, uri): 42 | raise NotImplementedError('load_index is not implemented') 43 | 44 | def store_index(self, uri, index): 45 | raise NotImplementedError('store_index is not implemented') 46 | 47 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/layerindexlib/tests/__init__.py -------------------------------------------------------------------------------- /lib/layerindexlib/tests/common.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017-2018 Wind River Systems, Inc. 2 | # 3 | # SPDX-License-Identifier: GPL-2.0-only 4 | # 5 | 6 | import unittest 7 | import tempfile 8 | import os 9 | import bb 10 | 11 | import logging 12 | 13 | class LayersTest(unittest.TestCase): 14 | 15 | def setUp(self): 16 | self.origdir = os.getcwd() 17 | self.d = bb.data.init() 18 | # At least one variable needs to be set 19 | self.d.setVar('DL_DIR', os.getcwd()) 20 | 21 | if os.environ.get("BB_SKIP_NETTESTS") == "yes": 22 | self.d.setVar('BB_NO_NETWORK', '1') 23 | 24 | self.tempdir = tempfile.mkdtemp() 25 | self.logger = logging.getLogger("BitBake") 26 | 27 | def tearDown(self): 28 | os.chdir(self.origdir) 29 | if os.environ.get("BB_TMPDIR_NOCLEAN") == "yes": 30 | print("Not cleaning up %s. Please remove manually." % self.tempdir) 31 | else: 32 | bb.utils.prunedir(self.tempdir) 33 | 34 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/testdata/README: -------------------------------------------------------------------------------- 1 | This test data is used to verify the 'cooker' module of the layerindex. 2 | 3 | The module consists of a faux project bblayers.conf with four layers defined. 4 | 5 | layer1 - openembedded-core 6 | layer2 - networking-layer 7 | layer3 - meta-python 8 | layer4 - openembedded-layer (meta-oe) 9 | 10 | Since we do not have a fully populated cooker, we use this to test the 11 | basic index generation, and not any deep recipe based contents. 12 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/testdata/build/conf/bblayers.conf: -------------------------------------------------------------------------------- 1 | LAYERSERIES_CORENAMES = "sumo" 2 | 3 | # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf 4 | # changes incompatibly 5 | LCONF_VERSION = "7" 6 | 7 | BBPATH = "${TOPDIR}" 8 | BBFILES ?= "" 9 | 10 | BBLAYERS ?= " \ 11 | ${TOPDIR}/layer1 \ 12 | ${TOPDIR}/layer2 \ 13 | ${TOPDIR}/layer3 \ 14 | ${TOPDIR}/layer4 \ 15 | " 16 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/testdata/layer1/conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We have a conf and classes directory, add to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | # We have recipes-* directories, add to BBFILES 4 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb" 5 | 6 | BBFILE_COLLECTIONS += "core" 7 | BBFILE_PATTERN_core = "^${LAYERDIR}/" 8 | BBFILE_PRIORITY_core = "5" 9 | 10 | LAYERSERIES_CORENAMES = "sumo" 11 | 12 | # This should only be incremented on significant changes that will 13 | # cause compatibility issues with other layers 14 | LAYERVERSION_core = "11" 15 | LAYERSERIES_COMPAT_core = "sumo" 16 | 17 | BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core" 18 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/testdata/layer2/conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We have a conf and classes directory, add to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | 4 | # We have a packages directory, add to BBFILES 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" 7 | 8 | BBFILE_COLLECTIONS += "networking-layer" 9 | BBFILE_PATTERN_networking-layer := "^${LAYERDIR}/" 10 | BBFILE_PRIORITY_networking-layer = "5" 11 | 12 | # This should only be incremented on significant changes that will 13 | # cause compatibility issues with other layers 14 | LAYERVERSION_networking-layer = "1" 15 | 16 | LAYERDEPENDS_networking-layer = "core" 17 | LAYERDEPENDS_networking-layer += "openembedded-layer" 18 | LAYERDEPENDS_networking-layer += "meta-python" 19 | 20 | LAYERSERIES_COMPAT_networking-layer = "sumo" 21 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/testdata/layer3/conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We might have a conf and classes directory, append to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | 4 | # We have recipes directories, add to BBFILES 5 | BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" 6 | 7 | BBFILE_COLLECTIONS += "meta-python" 8 | BBFILE_PATTERN_meta-python := "^${LAYERDIR}/" 9 | BBFILE_PRIORITY_meta-python = "7" 10 | 11 | # This should only be incremented on significant changes that will 12 | # cause compatibility issues with other layers 13 | LAYERVERSION_meta-python = "1" 14 | 15 | LAYERDEPENDS_meta-python = "core openembedded-layer" 16 | 17 | LAYERSERIES_COMPAT_meta-python = "sumo" 18 | 19 | LICENSE_PATH += "${LAYERDIR}/licenses" 20 | -------------------------------------------------------------------------------- /lib/layerindexlib/tests/testdata/layer4/conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We have a conf and classes directory, append to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | 4 | # We have a recipes directory, add to BBFILES 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" 6 | 7 | BBFILE_COLLECTIONS += "openembedded-layer" 8 | BBFILE_PATTERN_openembedded-layer := "^${LAYERDIR}/" 9 | 10 | # Define the priority for recipes (.bb files) from this layer, 11 | # choosing carefully how this layer interacts with all of the 12 | # other layers. 13 | 14 | BBFILE_PRIORITY_openembedded-layer = "6" 15 | 16 | # This should only be incremented on significant changes that will 17 | # cause compatibility issues with other layers 18 | LAYERVERSION_openembedded-layer = "1" 19 | 20 | LAYERDEPENDS_openembedded-layer = "core" 21 | 22 | LAYERSERIES_COMPAT_openembedded-layer = "sumo" 23 | -------------------------------------------------------------------------------- /lib/ply/__init__.py: -------------------------------------------------------------------------------- 1 | # PLY package 2 | # Author: David Beazley (dave@dabeaz.com) 3 | 4 | __all__ = ['lex','yacc'] 5 | -------------------------------------------------------------------------------- /lib/progressbar/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # progressbar - Text progress bar library for Python. 5 | # Copyright (c) 2005 Nilton Volpato 6 | # 7 | # SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause-Clear 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 | 23 | """Text progress bar library for Python. 24 | 25 | A text progress bar is typically used to display the progress of a long 26 | running operation, providing a visual cue that processing is underway. 27 | 28 | The ProgressBar class manages the current progress, and the format of the line 29 | is given by a number of widgets. A widget is an object that may display 30 | differently depending on the state of the progress bar. There are three types 31 | of widgets: 32 | - a string, which always shows itself 33 | 34 | - a ProgressBarWidget, which may return a different value every time its 35 | update method is called 36 | 37 | - a ProgressBarWidgetHFill, which is like ProgressBarWidget, except it 38 | expands to fill the remaining width of the line. 39 | 40 | The progressbar module is very easy to use, yet very powerful. It will also 41 | automatically enable features like auto-resizing when the system supports it. 42 | """ 43 | 44 | __author__ = 'Nilton Volpato' 45 | __author_email__ = 'first-name dot last-name @ gmail.com' 46 | __date__ = '2011-05-14' 47 | __version__ = '2.3' 48 | 49 | from .compat import * 50 | from .widgets import * 51 | from .progressbar import * 52 | -------------------------------------------------------------------------------- /lib/progressbar/compat.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # progressbar - Text progress bar library for Python. 4 | # Copyright (c) 2005 Nilton Volpato 5 | # 6 | # SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause-Clear 7 | # 8 | # This library is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU Lesser General Public 10 | # License as published by the Free Software Foundation; either 11 | # version 2.1 of the License, or (at your option) any later version. 12 | # 13 | # This library is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | # Lesser General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU Lesser General Public 19 | # License along with this library; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | """Compatibility methods and classes for the progressbar module.""" 23 | 24 | 25 | # Python 3.x (and backports) use a modified iterator syntax 26 | # This will allow 2.x to behave with 3.x iterators 27 | try: 28 | next 29 | except NameError: 30 | def next(iter): 31 | try: 32 | # Try new style iterators 33 | return iter.__next__() 34 | except AttributeError: 35 | # Fallback in case of a "native" iterator 36 | return iter.next() 37 | 38 | 39 | # Python < 2.5 does not have "any" 40 | try: 41 | any 42 | except NameError: 43 | def any(iterator): 44 | for item in iterator: 45 | if item: return True 46 | return False 47 | -------------------------------------------------------------------------------- /lib/simplediff/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008 - 2013 Paul Butler and contributors 2 | 3 | This sofware may be used under a zlib/libpng-style license: 4 | 5 | This software is provided 'as-is', without any express or implied warranty. In 6 | no event will the authors be held liable for any damages arising from the use 7 | of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, including 10 | commercial applications, and to alter it and redistribute it freely, subject to 11 | the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not claim 14 | that you wrote the original software. If you use this software in a product, an 15 | acknowledgment in the product documentation would be appreciated but is not 16 | required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source distribution. 22 | 23 | -------------------------------------------------------------------------------- /lib/toaster/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/__init__.py -------------------------------------------------------------------------------- /lib/toaster/bldcollector/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/bldcollector/__init__.py -------------------------------------------------------------------------------- /lib/toaster/bldcollector/admin.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | from django.contrib import admin 6 | from orm.models import BitbakeVersion, Release, ToasterSetting, Layer_Version 7 | from django import forms 8 | import django.db.models as models 9 | 10 | 11 | class BitbakeVersionAdmin(admin.ModelAdmin): 12 | 13 | # we override the formfield for db URLField 14 | # because of broken URL validation 15 | 16 | def formfield_for_dbfield(self, db_field, **kwargs): 17 | if isinstance(db_field, models.fields.URLField): 18 | return forms.fields.CharField() 19 | return super(BitbakeVersionAdmin, self).formfield_for_dbfield( 20 | db_field, **kwargs) 21 | 22 | 23 | class ReleaseAdmin(admin.ModelAdmin): 24 | pass 25 | 26 | 27 | class ToasterSettingAdmin(admin.ModelAdmin): 28 | pass 29 | 30 | 31 | class LayerVersionsAdmin(admin.ModelAdmin): 32 | pass 33 | 34 | admin.site.register(Layer_Version, LayerVersionsAdmin) 35 | admin.site.register(BitbakeVersion, BitbakeVersionAdmin) 36 | admin.site.register(Release, ReleaseAdmin) 37 | admin.site.register(ToasterSetting, ToasterSettingAdmin) 38 | -------------------------------------------------------------------------------- /lib/toaster/bldcollector/urls.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake Toaster Implementation 3 | # 4 | # Copyright (C) 2014-2017 Intel Corporation 5 | # 6 | # SPDX-License-Identifier: GPL-2.0-only 7 | # 8 | 9 | from django.urls import re_path as url 10 | 11 | import bldcollector.views 12 | 13 | urlpatterns = [ 14 | # landing point for pushing a bitbake_eventlog.json file to this toaster instace 15 | url(r'^eventfile$', bldcollector.views.eventfile, name='eventfile'), 16 | ] 17 | -------------------------------------------------------------------------------- /lib/toaster/bldcollector/views.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake Toaster Implementation 3 | # 4 | # Copyright (C) 2014 Intel Corporation 5 | # 6 | # SPDX-License-Identifier: GPL-2.0-only 7 | # 8 | 9 | from django.urls import reverse 10 | from django.http import HttpResponseBadRequest, HttpResponse 11 | import os 12 | import tempfile 13 | import subprocess 14 | import toastermain 15 | from django.views.decorators.csrf import csrf_exempt 16 | 17 | from toastermain.logs import log_view_mixin 18 | 19 | 20 | @csrf_exempt 21 | @log_view_mixin 22 | def eventfile(request): 23 | """ Receives a file by POST, and runs toaster-eventreply on this file """ 24 | if request.method != "POST": 25 | return HttpResponseBadRequest("This API only accepts POST requests. Post a file with:\n\ncurl -F eventlog=@bitbake_eventlog.json %s\n" % request.build_absolute_uri(reverse('eventfile')), content_type="text/plain;utf8") 26 | 27 | # write temporary file 28 | (handle, abstemppath) = tempfile.mkstemp(dir="/tmp/") 29 | with os.fdopen(handle, "w") as tmpfile: 30 | for chunk in request.FILES['eventlog'].chunks(): 31 | tmpfile.write(chunk) 32 | tmpfile.close() 33 | 34 | # compute the path to "bitbake/bin/toaster-eventreplay" 35 | from os.path import dirname as DN 36 | import_script = os.path.join(DN(DN(DN(DN(os.path.abspath(__file__))))), "bin/toaster-eventreplay") 37 | if not os.path.exists(import_script): 38 | raise Exception("script missing %s" % import_script) 39 | scriptenv = os.environ.copy() 40 | scriptenv["DATABASE_URL"] = toastermain.settings.getDATABASE_URL() 41 | 42 | # run the data loading process and return the results 43 | importer = subprocess.Popen([import_script, abstemppath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=scriptenv) 44 | (out, err) = importer.communicate() 45 | if importer.returncode == 0: 46 | os.remove(abstemppath) 47 | return HttpResponse("== Retval %d\n== STDOUT\n%s\n\n== STDERR\n%s" % (importer.returncode, out, err), content_type="text/plain;utf8") 48 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/bldcontrol/__init__.py -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/admin.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | from django.contrib import admin 6 | from .models import BuildEnvironment 7 | 8 | class BuildEnvironmentAdmin(admin.ModelAdmin): 9 | pass 10 | 11 | admin.site.register(BuildEnvironment, BuildEnvironmentAdmin) 12 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/bldcontrol/management/__init__.py -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/bldcontrol/management/commands/__init__.py -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('bldcontrol', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='buildenvironment', 16 | name='betype', 17 | field=models.IntegerField(choices=[(0, b'local')]), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0003_add_cancelling_state.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('bldcontrol', '0002_auto_20160120_1250'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='buildrequest', 16 | name='state', 17 | field=models.IntegerField(default=0, choices=[(0, b'created'), (1, b'queued'), (2, b'in progress'), (3, b'completed'), (4, b'failed'), (5, b'deleted'), (6, b'cancelling'), (7, b'archive')]), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0004_auto_20160523_1446.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('bldcontrol', '0003_add_cancelling_state'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='buildenvironment', 16 | name='bbstate', 17 | field=models.IntegerField(default=0, choices=[(0, 'stopped'), (1, 'started')]), 18 | ), 19 | migrations.AlterField( 20 | model_name='buildenvironment', 21 | name='betype', 22 | field=models.IntegerField(choices=[(0, 'local')]), 23 | ), 24 | migrations.AlterField( 25 | model_name='buildenvironment', 26 | name='lock', 27 | field=models.IntegerField(default=0, choices=[(0, 'free'), (1, 'lock'), (2, 'running')]), 28 | ), 29 | migrations.AlterField( 30 | model_name='buildrequest', 31 | name='state', 32 | field=models.IntegerField(default=0, choices=[(0, 'created'), (1, 'queued'), (2, 'in progress'), (3, 'completed'), (4, 'failed'), (5, 'deleted'), (6, 'cancelling'), (7, 'archive')]), 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0005_reorder_buildrequest_states.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('bldcontrol', '0004_auto_20160523_1446'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='buildrequest', 16 | name='state', 17 | field=models.IntegerField(choices=[(0, 'created'), (1, 'queued'), (2, 'in progress'), (3, 'failed'), (4, 'deleted'), (5, 'cancelling'), (6, 'completed'), (7, 'archive')], default=0), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0006_brlayer_local_source_dir.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('bldcontrol', '0005_reorder_buildrequest_states'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='brlayer', 16 | name='local_source_dir', 17 | field=models.CharField(max_length=254, null=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0007_brlayers_optional_gitinfo.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('bldcontrol', '0006_brlayer_local_source_dir'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='brlayer', 16 | name='commit', 17 | field=models.CharField(max_length=254, null=True), 18 | ), 19 | migrations.AlterField( 20 | model_name='brlayer', 21 | name='dirpath', 22 | field=models.CharField(max_length=254, null=True), 23 | ), 24 | migrations.AlterField( 25 | model_name='brlayer', 26 | name='giturl', 27 | field=models.CharField(max_length=254, null=True), 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.12 on 2022-03-06 03:28 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('bldcontrol', '0007_brlayers_optional_gitinfo'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='brbitbake', 15 | name='id', 16 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 17 | ), 18 | migrations.AlterField( 19 | model_name='brerror', 20 | name='id', 21 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 22 | ), 23 | migrations.AlterField( 24 | model_name='brlayer', 25 | name='id', 26 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 27 | ), 28 | migrations.AlterField( 29 | model_name='brtarget', 30 | name='id', 31 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 32 | ), 33 | migrations.AlterField( 34 | model_name='brvariable', 35 | name='id', 36 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 37 | ), 38 | migrations.AlterField( 39 | model_name='buildenvironment', 40 | name='id', 41 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 42 | ), 43 | migrations.AlterField( 44 | model_name='buildrequest', 45 | name='id', 46 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 47 | ), 48 | ] 49 | -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/bldcontrol/migrations/__init__.py -------------------------------------------------------------------------------- /lib/toaster/bldcontrol/views.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | # Create your views here. 6 | -------------------------------------------------------------------------------- /lib/toaster/logs/.gitignore: -------------------------------------------------------------------------------- 1 | *.log* 2 | -------------------------------------------------------------------------------- /lib/toaster/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright BitBake Contributors 4 | # 5 | # SPDX-License-Identifier: GPL-2.0-only 6 | # 7 | 8 | import os 9 | import sys 10 | 11 | if __name__ == "__main__": 12 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings") 13 | 14 | from django.core.management import execute_from_command_line 15 | 16 | execute_from_command_line(sys.argv) 17 | -------------------------------------------------------------------------------- /lib/toaster/orm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/orm/__init__.py -------------------------------------------------------------------------------- /lib/toaster/orm/fixtures/README: -------------------------------------------------------------------------------- 1 | # Fixtures directory 2 | 3 | Fixtures are data dumps that can be loaded into Toaster's database to provide 4 | configuration and data. 5 | 6 | In this directory we have the fixtures which are loaded the first time you start Toaster. 7 | This is to provide useful default values and metadata to Toaster. 8 | 9 | - settings.xml This Contains Toaster wide settings, such as the default values for 10 | certain bitbake variables. 11 | 12 | - poky.xml This is the default release data for supported poky based setup 13 | 14 | - oe-core.xml This is the default release data for supported oe-core based setups 15 | 16 | # Custom data/configuration 17 | 18 | - custom.xml 19 | 20 | To add custom initial data/configuration to Toaster place a file called 21 | "custom.xml" in this directory. If present it will be loaded into the database. 22 | We suggest that this is used to overlay any configuration already done. 23 | All objects loaded with the same primary keys overwrite the existing data. 24 | Data can be provided in XML, JSON and if installed YAML formats. 25 | 26 | # To load data at any point in time 27 | 28 | Use the django management command manage.py loaddata 29 | For further information see the Django command documentation at: 30 | https://docs.djangoproject.com/en/3.2/ref/django-admin/#django-admin-loaddata 31 | -------------------------------------------------------------------------------- /lib/toaster/orm/fixtures/check_fixtures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (C) 2025 Linux Foundation 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | # 6 | 7 | import json 8 | import urllib.request 9 | 10 | import gen_fixtures as fixtures 11 | 12 | RELEASE_URL = "https://dashboard.yoctoproject.org/releases.json" 13 | 14 | with urllib.request.urlopen(RELEASE_URL) as response: 15 | if response.getcode() == 200: 16 | data = response.read().decode("utf-8") 17 | releases = json.loads(data) 18 | else: 19 | print("Couldn't access %s: %s" % (RELEASE_URL, reponse.getcode())) 20 | exit(1) 21 | 22 | 23 | # grab the recent release branches and add master, so we can ignore old branches 24 | active_releases = [ 25 | e["release_codename"].lower() for e in releases if e["series"] == "current" 26 | ] 27 | active_releases.append("master") 28 | active_releases.append("head") 29 | 30 | fixtures_releases = [x[0].lower() for x in fixtures.current_releases] 31 | 32 | if set(active_releases) != set(fixtures_releases): 33 | print("WARNING: Active releases don't match toaster configured releases, the difference is: %s" % set(active_releases).difference(set(fixtures_releases))) 34 | print("Active releases: %s" % sorted(active_releases)) 35 | print("Toaster configured releases: %s" % sorted(fixtures_releases)) 36 | else: 37 | print("Success, configuration matches") 38 | 39 | -------------------------------------------------------------------------------- /lib/toaster/orm/fixtures/custom_toaster_append.sh_sample: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2017 Intel Corp. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License version 2 as 7 | # published by the Free Software Foundation. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # See the GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | # This is sample software. Rename it to 'custom_toaster_append.sh' and 19 | # enable the respective custom sections. 20 | 21 | verbose=0 22 | if [ $verbose -ne 0 ] ; then 23 | echo "custom_toaster_append.sh:$*" 24 | fi 25 | 26 | if [ "toaster_prepend" = "$1" ] ; then 27 | echo "Add custom actions here when Toaster script is started" 28 | fi 29 | 30 | if [ "web_start_postpend" = "$1" ] ; then 31 | echo "Add custom actions here after Toaster web service is started" 32 | fi 33 | 34 | if [ "web_stop_postpend" = "$1" ] ; then 35 | echo "Add custom actions here after Toaster web service is stopped" 36 | fi 37 | 38 | if [ "noweb_start_postpend" = "$1" ] ; then 39 | echo "Add custom actions here after Toaster (no web) service is started" 40 | fi 41 | 42 | if [ "noweb_stop_postpend" = "$1" ] ; then 43 | echo "Add custom actions here after Toaster (no web) service is stopped" 44 | fi 45 | 46 | if [ "toaster_postpend" = "$1" ] ; then 47 | echo "Add custom actions here after Toaster script is done" 48 | fi 49 | 50 | -------------------------------------------------------------------------------- /lib/toaster/orm/fixtures/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DEFAULT_RELEASE 7 | master 8 | 9 | 10 | DEFCONF_PACKAGE_CLASSES 11 | package_rpm 12 | 13 | 14 | DEFCONF_MACHINE 15 | qemux86-64 16 | 17 | 18 | DEFCONF_SSTATE_DIR 19 | ${TOPDIR}/../sstate-cache 20 | 21 | 22 | DEFCONF_IMAGE_INSTALL:append 23 | 24 | 25 | 26 | DEFCONF_IMAGE_FSTYPES 27 | ext3 jffs2 tar.bz2 28 | 29 | 30 | DEFCONF_DL_DIR 31 | ${TOPDIR}/../downloads 32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/toaster/orm/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/orm/management/__init__.py -------------------------------------------------------------------------------- /lib/toaster/orm/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/orm/management/commands/__init__.py -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0002_customimagerecipe.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='CustomImageRecipe', 16 | fields=[ 17 | ('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe', on_delete=models.CASCADE)), 18 | ('last_updated', models.DateTimeField(default=None, null=True)), 19 | ('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe', on_delete=models.CASCADE)), 20 | ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)), 21 | ], 22 | bases=('orm.recipe',), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0003_customimagepackage.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0002_customimagerecipe'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='CustomImagePackage', 16 | fields=[ 17 | ('package_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Package', on_delete=models.CASCADE)), 18 | ('recipe_appends', models.ManyToManyField(related_name='appends_set', to='orm.CustomImageRecipe')), 19 | ('recipe_excludes', models.ManyToManyField(related_name='excludes_set', to='orm.CustomImageRecipe')), 20 | ('recipe_includes', models.ManyToManyField(related_name='includes_set', to='orm.CustomImageRecipe')), 21 | ], 22 | bases=('orm.package',), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0004_provides.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0003_customimagepackage'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Provides', 16 | fields=[ 17 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 18 | ('name', models.CharField(max_length=100)), 19 | ('recipe', models.ForeignKey(to='orm.Recipe', on_delete=models.CASCADE)), 20 | ], 21 | ), 22 | migrations.AddField( 23 | model_name='recipe_dependency', 24 | name='via', 25 | field=models.ForeignKey(null=True, default=None, to='orm.Provides', on_delete=models.CASCADE), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0005_task_field_separation.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0004_provides'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name='task', 16 | name='cpu_usage', 17 | ), 18 | migrations.AddField( 19 | model_name='task', 20 | name='cpu_time_system', 21 | field=models.DecimalField(null=True, max_digits=8, decimal_places=2), 22 | ), 23 | migrations.AddField( 24 | model_name='task', 25 | name='cpu_time_user', 26 | field=models.DecimalField(null=True, max_digits=8, decimal_places=2), 27 | ), 28 | migrations.AddField( 29 | model_name='task', 30 | name='disk_io_read', 31 | field=models.IntegerField(null=True), 32 | ), 33 | migrations.AddField( 34 | model_name='task', 35 | name='disk_io_write', 36 | field=models.IntegerField(null=True), 37 | ), 38 | migrations.AddField( 39 | model_name='task', 40 | name='ended', 41 | field=models.DateTimeField(null=True), 42 | ), 43 | migrations.AddField( 44 | model_name='task', 45 | name='started', 46 | field=models.DateTimeField(null=True), 47 | ), 48 | ] 49 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0006_add_cancelled_state.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0005_task_field_separation'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='build', 16 | name='outcome', 17 | field=models.IntegerField(default=2, choices=[(0, b'Succeeded'), (1, b'Failed'), (2, b'In Progress'), (3, b'Cancelled')]), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0008_refactor_artifact_models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0007_auto_20160523_1446'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='TargetKernelFile', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), 18 | ('file_name', models.FilePathField()), 19 | ('file_size', models.IntegerField()), 20 | ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)), 21 | ], 22 | ), 23 | migrations.CreateModel( 24 | name='TargetSDKFile', 25 | fields=[ 26 | ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), 27 | ('file_name', models.FilePathField()), 28 | ('file_size', models.IntegerField()), 29 | ('target', models.ForeignKey(to='orm.Target', on_delete=models.CASCADE)), 30 | ], 31 | ), 32 | migrations.RemoveField( 33 | model_name='buildartifact', 34 | name='build', 35 | ), 36 | migrations.DeleteModel( 37 | name='BuildArtifact', 38 | ), 39 | ] 40 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0009_target_package_manifest_path.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0008_refactor_artifact_models'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='target', 16 | name='package_manifest_path', 17 | field=models.CharField(null=True, max_length=500), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0011_delete_layersource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0010_delete_layer_source_references'), 11 | ] 12 | 13 | operations = [ 14 | migrations.DeleteModel( 15 | name='LayerSource', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0012_use_release_instead_of_up_branch.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | from django.db.models import Q 6 | 7 | 8 | def branch_to_release(apps, schema_editor): 9 | Layer_Version = apps.get_model('orm', 'Layer_Version') 10 | Release = apps.get_model('orm', 'Release') 11 | 12 | print("Converting all layer version up_branches to releases") 13 | # Find all the layer versions which have an upbranch and convert them to 14 | # the release that they're for. 15 | for layer_version in Layer_Version.objects.filter( 16 | Q(release=None) & ~Q(up_branch=None)): 17 | try: 18 | # HEAD and local are equivalent 19 | if "HEAD" in layer_version.up_branch.name: 20 | release = Release.objects.get(name="local") 21 | layer_version.commit = "HEAD" 22 | layer_version.branch = "HEAD" 23 | else: 24 | release = Release.objects.get( 25 | name=layer_version.up_branch.name) 26 | 27 | layer_version.release = release 28 | layer_version.save() 29 | except Exception as e: 30 | print("Couldn't work out an appropriate release for %s " 31 | "the up_branch was %s " 32 | "user the django admin interface to correct it" % 33 | (layer_version.layer.name, layer_version.up_branch.name)) 34 | print(e) 35 | 36 | continue 37 | 38 | 39 | class Migration(migrations.Migration): 40 | 41 | dependencies = [ 42 | ('orm', '0011_delete_layersource'), 43 | ] 44 | 45 | operations = [ 46 | migrations.AddField( 47 | model_name='layer_version', 48 | name='release', 49 | field=models.ForeignKey(to='orm.Release', default=None, null=True, on_delete=models.CASCADE), 50 | ), 51 | migrations.RunPython(branch_to_release, 52 | reverse_code=migrations.RunPython.noop), 53 | 54 | migrations.RemoveField( 55 | model_name='layer_version', 56 | name='up_branch', 57 | ), 58 | 59 | migrations.DeleteModel( 60 | name='Branch', 61 | ), 62 | ] 63 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0013_recipe_parse_progress_fields.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0012_use_release_instead_of_up_branch'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='build', 16 | name='recipes_parsed', 17 | field=models.IntegerField(default=0), 18 | ), 19 | migrations.AddField( 20 | model_name='build', 21 | name='recipes_to_parse', 22 | field=models.IntegerField(default=1), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0014_allow_empty_buildname.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0013_recipe_parse_progress_fields'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='build', 16 | name='build_name', 17 | field=models.CharField(default='', max_length=100), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0015_layer_local_source_dir.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0014_allow_empty_buildname'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='layer', 16 | name='local_source_dir', 17 | field=models.TextField(null=True, default=None), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0016_clone_progress.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('orm', '0015_layer_local_source_dir'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='build', 15 | name='repos_cloned', 16 | field=models.IntegerField(default=1), 17 | ), 18 | migrations.AddField( 19 | model_name='build', 20 | name='repos_to_clone', 21 | field=models.IntegerField(default=1), # (default off) 22 | ), 23 | ] 24 | 25 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0017_distro_clone.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('orm', '0016_clone_progress'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Distro', 15 | fields=[ 16 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 17 | ('up_id', models.IntegerField(default=None, null=True)), 18 | ('up_date', models.DateTimeField(default=None, null=True)), 19 | ('name', models.CharField(max_length=255)), 20 | ('description', models.CharField(max_length=255)), 21 | ('layer_version', models.ForeignKey(to='orm.Layer_Version', on_delete=models.CASCADE)), 22 | ], 23 | ), 24 | ] 25 | 26 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0018_project_specific.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('orm', '0017_distro_clone'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='Project', 15 | name='builddir', 16 | field=models.TextField(), 17 | ), 18 | migrations.AddField( 19 | model_name='Project', 20 | name='merged_attr', 21 | field=models.BooleanField(default=False) 22 | ), 23 | migrations.AddField( 24 | model_name='Build', 25 | name='progress_item', 26 | field=models.CharField(max_length=40) 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0019_django_2_2.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.7 on 2019-11-19 03:38 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('orm', '0018_project_specific'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name='distro', 16 | name='up_id', 17 | ), 18 | migrations.AlterField( 19 | model_name='build', 20 | name='recipes_parsed', 21 | field=models.IntegerField(default=1), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/0021_eventlogsimports.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.5 on 2023-11-23 18:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('orm', '0020_models_bigautofield'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='EventLogsImports', 15 | fields=[ 16 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=255)), 18 | ('imported', models.BooleanField(default=False)), 19 | ('build_id', models.IntegerField(blank=True, null=True)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /lib/toaster/orm/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/orm/migrations/__init__.py -------------------------------------------------------------------------------- /lib/toaster/pytest.ini: -------------------------------------------------------------------------------- 1 | # -- FILE: pytest.ini (or tox.ini) 2 | [pytest] 3 | # --create-db - force re creation of the test database 4 | # https://pytest-django.readthedocs.io/en/latest/database.html#create-db-force-re-creation-of-the-test-database 5 | 6 | # --html=report.html --self-contained-html 7 | # https://docs.pytest.org/en/latest/usage.html#creating-html-reports 8 | # https://pytest-html.readthedocs.io/en/latest/user_guide.html#creating-a-self-contained-report 9 | addopts = --create-db --html="Toaster Tests Report.html" --self-contained-html 10 | 11 | # Define environment variables using pytest-env 12 | # A pytest plugin that enables you to set environment variables in the pytest.ini file. 13 | # https://pypi.org/project/pytest-env/ 14 | env = 15 | TOASTER_BUILDSERVER=1 16 | DJANGO_SETTINGS_MODULE=toastermain.settings_test 17 | -------------------------------------------------------------------------------- /lib/toaster/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/__init__.py -------------------------------------------------------------------------------- /lib/toaster/tests/browser/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/browser/__init__.py -------------------------------------------------------------------------------- /lib/toaster/tests/browser/selenium_helpers.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2013-2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | # The Wait class and some of SeleniumDriverHelper and SeleniumTestCase are 10 | # modified from Patchwork, released under the same licence terms as Toaster: 11 | # https://github.com/dlespiau/patchwork/blob/master/patchwork/tests.browser.py 12 | 13 | """ 14 | Helper methods for creating Toaster Selenium tests which run within 15 | the context of Django unit tests. 16 | """ 17 | from django.contrib.staticfiles.testing import StaticLiveServerTestCase 18 | from tests.browser.selenium_helpers_base import SeleniumTestCaseBase 19 | 20 | class SeleniumTestCase(SeleniumTestCaseBase, StaticLiveServerTestCase): 21 | pass 22 | -------------------------------------------------------------------------------- /lib/toaster/tests/browser/test_builddashboard_page_recipes.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2013-2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | from django.urls import reverse 11 | from django.utils import timezone 12 | from tests.browser.selenium_helpers import SeleniumTestCase 13 | from orm.models import Project, Build, Recipe, Task, Layer, Layer_Version 14 | from orm.models import Target 15 | 16 | class TestBuilddashboardPageRecipes(SeleniumTestCase): 17 | """ Test build dashboard recipes sub-page """ 18 | 19 | def setUp(self): 20 | project = Project.objects.get_or_create_default_project() 21 | 22 | now = timezone.now() 23 | 24 | self.build = Build.objects.create(project=project, 25 | started_on=now, 26 | completed_on=now) 27 | 28 | layer = Layer.objects.create() 29 | 30 | layer_version = Layer_Version.objects.create(layer=layer, 31 | build=self.build) 32 | 33 | recipe = Recipe.objects.create(layer_version=layer_version) 34 | 35 | task = Task.objects.create(build=self.build, recipe=recipe, order=1) 36 | 37 | Target.objects.create(build=self.build, task=task, target='do_build') 38 | 39 | def test_build_recipes_columns(self): 40 | """ 41 | Check that non-hideable columns of the table on the recipes sub-page 42 | are disabled on the edit columns dropdown. 43 | """ 44 | url = reverse('recipes', args=(self.build.id,)) 45 | self.get(url) 46 | 47 | self.wait_until_visible('#edit-columns-button') 48 | 49 | # check that options for the non-hideable columns are disabled 50 | non_hideable = ['name', 'version'] 51 | 52 | for column in non_hideable: 53 | selector = 'input#checkbox-%s[disabled="disabled"]' % column 54 | self.wait_until_present(selector) 55 | -------------------------------------------------------------------------------- /lib/toaster/tests/browser/test_builddashboard_page_tasks.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2013-2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | from django.urls import reverse 11 | from django.utils import timezone 12 | from tests.browser.selenium_helpers import SeleniumTestCase 13 | from orm.models import Project, Build, Recipe, Task, Layer, Layer_Version 14 | from orm.models import Target 15 | 16 | class TestBuilddashboardPageTasks(SeleniumTestCase): 17 | """ Test build dashboard tasks sub-page """ 18 | 19 | def setUp(self): 20 | project = Project.objects.get_or_create_default_project() 21 | 22 | now = timezone.now() 23 | 24 | self.build = Build.objects.create(project=project, 25 | started_on=now, 26 | completed_on=now) 27 | 28 | layer = Layer.objects.create() 29 | 30 | layer_version = Layer_Version.objects.create(layer=layer) 31 | 32 | recipe = Recipe.objects.create(layer_version=layer_version) 33 | 34 | task = Task.objects.create(build=self.build, recipe=recipe, order=1) 35 | 36 | Target.objects.create(build=self.build, task=task, target='do_build') 37 | 38 | def test_build_tasks_columns(self): 39 | """ 40 | Check that non-hideable columns of the table on the tasks sub-page 41 | are disabled on the edit columns dropdown. 42 | """ 43 | url = reverse('tasks', args=(self.build.id,)) 44 | self.get(url) 45 | 46 | self.wait_until_visible('#edit-columns-button') 47 | 48 | # check that options for the non-hideable columns are disabled 49 | non_hideable = ['order', 'task_name', 'recipe__name'] 50 | 51 | for column in non_hideable: 52 | selector = 'input#checkbox-%s[disabled="disabled"]' % column 53 | self.wait_until_present(selector) 54 | -------------------------------------------------------------------------------- /lib/toaster/tests/browser/test_js_unit_tests.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2013-2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | """ 11 | Run the js unit tests 12 | """ 13 | 14 | from django.urls import reverse 15 | from tests.browser.selenium_helpers import SeleniumTestCase 16 | import logging 17 | 18 | logger = logging.getLogger("toaster") 19 | 20 | 21 | class TestJsUnitTests(SeleniumTestCase): 22 | """ Test landing page shows the Toaster brand """ 23 | 24 | fixtures = ['toastergui-unittest-data'] 25 | 26 | def test_that_js_unit_tests_pass(self): 27 | url = reverse('js-unit-tests') 28 | self.get(url) 29 | self.wait_until_present('#qunit-testresult .failed') 30 | 31 | failed = self.find("#qunit-testresult .failed").text 32 | passed = self.find("#qunit-testresult .passed").text 33 | total = self.find("#qunit-testresult .total").text 34 | 35 | logger.info("Js unit tests completed %s out of %s passed, %s failed", 36 | passed, 37 | total, 38 | failed) 39 | 40 | failed_tests = self.find_all("li .fail .test-message") 41 | for fail in failed_tests: 42 | logger.error("JS unit test failed: %s" % fail.text) 43 | 44 | self.assertEqual(failed, '0', 45 | "%s JS unit tests failed" % failed) 46 | -------------------------------------------------------------------------------- /lib/toaster/tests/browser/test_project_page.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2013-2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | from django.urls import reverse 11 | from django.utils import timezone 12 | from tests.browser.selenium_helpers import SeleniumTestCase 13 | 14 | from orm.models import Build, Project 15 | 16 | class TestProjectPage(SeleniumTestCase): 17 | """ Test project data at /project/X/ is displayed correctly """ 18 | 19 | CLI_BUILDS_PROJECT_NAME = 'Command line builds' 20 | 21 | def test_cli_builds_in_progress(self): 22 | """ 23 | In progress builds should not cause an error to be thrown 24 | when navigating to "command line builds" project page; 25 | see https://bugzilla.yoctoproject.org/show_bug.cgi?id=8277 26 | """ 27 | 28 | # add the "command line builds" default project; this mirrors what 29 | # we do with get_or_create_default_project() 30 | default_project = Project.objects.create_project(self.CLI_BUILDS_PROJECT_NAME, None) 31 | default_project.is_default = True 32 | default_project.save() 33 | 34 | # add an "in progress" build for the default project 35 | now = timezone.now() 36 | Build.objects.create(project=default_project, 37 | started_on=now, 38 | completed_on=now, 39 | outcome=Build.IN_PROGRESS) 40 | 41 | # navigate to the project page for the default project 42 | url = reverse("project", args=(default_project.id,)) 43 | self.get(url) 44 | 45 | # check that we get a project page with the correct heading 46 | project_name = self.find('.project-name').text.strip() 47 | self.assertEqual(project_name, self.CLI_BUILDS_PROJECT_NAME) 48 | -------------------------------------------------------------------------------- /lib/toaster/tests/browser/test_sample.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2013-2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | """ 11 | A small example test demonstrating the basics of writing a test with 12 | Toaster's SeleniumTestCase; this just fetches the Toaster home page 13 | and checks it has the word "Toaster" in the brand link 14 | 15 | New test files should follow this structure, should be named "test_*.py", 16 | and should be in the same directory as this sample. 17 | """ 18 | 19 | from django.urls import reverse 20 | from tests.browser.selenium_helpers import SeleniumTestCase 21 | 22 | class TestSample(SeleniumTestCase): 23 | """ Test landing page shows the Toaster brand """ 24 | 25 | def test_landing_page_has_brand(self): 26 | url = reverse('landing') 27 | self.get(url) 28 | brand_link = self.find('.toaster-navbar-brand a.brand') 29 | self.assertEqual(brand_link.text.strip(), 'Toaster') 30 | 31 | def test_no_builds_message(self): 32 | """ Test that a message is shown when there are no builds """ 33 | url = reverse('all-builds') 34 | self.get(url) 35 | self.wait_until_visible('#empty-state-allbuildstable') # wait for the empty state div to appear 36 | div_msg = self.find('#empty-state-allbuildstable .alert-info') 37 | 38 | msg = 'Sorry - no data found' 39 | self.assertEqual(div_msg.text, msg) 40 | -------------------------------------------------------------------------------- /lib/toaster/tests/builds/README: -------------------------------------------------------------------------------- 1 | # Running build tests 2 | 3 | These tests are to test the running of builds and the data produced by the builds. 4 | Your oe build environment must be sourced/initialised for these tests to run. 5 | 6 | The simplest way to run the tests are the following commands: 7 | 8 | $ . oe-init-build-env 9 | $ cd bitbake/lib/toaster/ # path my vary but this is into toaster's directory 10 | $ DJANGO_SETTINGS_MODULE='toastermain.settings_test' ./manage.py test tests.builds 11 | 12 | Optional environment variables: 13 | - TOASTER_DIR (where toaster keeps it's artifacts) 14 | - TOASTER_CONF a path to the toasterconf.json file. This will need to be set if you don't execute the tests from toaster's own directory. 15 | -------------------------------------------------------------------------------- /lib/toaster/tests/builds/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/builds/__init__.py -------------------------------------------------------------------------------- /lib/toaster/tests/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/commands/__init__.py -------------------------------------------------------------------------------- /lib/toaster/tests/commands/test_loaddata.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | import pytest 10 | from django.test import TestCase 11 | from django.core import management 12 | 13 | from orm.models import Layer_Version, Layer, Release, ToasterSetting 14 | 15 | @pytest.mark.order(2) 16 | class TestLoadDataFixtures(TestCase): 17 | """ Test loading our 3 provided fixtures """ 18 | def test_run_loaddata_poky_command(self): 19 | management.call_command('loaddata', 'poky') 20 | 21 | num_releases = Release.objects.count() 22 | 23 | self.assertTrue( 24 | Layer_Version.objects.filter( 25 | layer__name="meta-poky").count() == num_releases, 26 | "Loaded poky fixture but don't have a meta-poky for all releases" 27 | " defined") 28 | 29 | def test_run_loaddata_oecore_command(self): 30 | management.call_command('loaddata', 'oe-core') 31 | 32 | # We only have the one layer for oe-core setup 33 | self.assertTrue( 34 | Layer.objects.filter(name="openembedded-core").count() > 0, 35 | "Loaded oe-core fixture but still have no openemebedded-core" 36 | " layer") 37 | 38 | def test_run_loaddata_settings_command(self): 39 | management.call_command('loaddata', 'settings') 40 | 41 | self.assertTrue( 42 | ToasterSetting.objects.filter(name="DEFAULT_RELEASE").count() > 0, 43 | "Loaded settings but have no DEFAULT_RELEASE") 44 | 45 | self.assertTrue( 46 | ToasterSetting.objects.filter( 47 | name__startswith="DEFCONF").count() > 0, 48 | "Loaded settings but have no DEFCONF (default project " 49 | "configuration values)") 50 | -------------------------------------------------------------------------------- /lib/toaster/tests/commands/test_lsupdates.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2016 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | import pytest 11 | from django.test import TestCase 12 | from django.core import management 13 | 14 | from orm.models import Layer_Version, Machine, Recipe 15 | 16 | @pytest.mark.order(3) 17 | class TestLayerIndexUpdater(TestCase): 18 | def test_run_lsupdates_command(self): 19 | # Load some release information for us to fetch from the layer index 20 | management.call_command('loaddata', 'poky') 21 | 22 | old_layers_count = Layer_Version.objects.count() 23 | old_recipes_count = Recipe.objects.count() 24 | old_machines_count = Machine.objects.count() 25 | 26 | # Now fetch the metadata from the layer index 27 | management.call_command('lsupdates') 28 | 29 | self.assertTrue(Layer_Version.objects.count() > old_layers_count, 30 | "lsupdates ran but we still have no more layers!") 31 | self.assertTrue(Recipe.objects.count() > old_recipes_count, 32 | "lsupdates ran but we still have no more Recipes!") 33 | self.assertTrue(Machine.objects.count() > old_machines_count, 34 | "lsupdates ran but we still have no more Machines!") 35 | -------------------------------------------------------------------------------- /lib/toaster/tests/db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/db/__init__.py -------------------------------------------------------------------------------- /lib/toaster/tests/db/test_db.py: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | # 3 | # Copyright (c) 2016 Damien Lespiau 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | # SOFTWARE. 24 | 25 | import sys 26 | import pytest 27 | 28 | try: 29 | from StringIO import StringIO 30 | except ImportError: 31 | from io import StringIO 32 | 33 | from contextlib import contextmanager 34 | 35 | from django.core import management 36 | from django.test import TestCase 37 | 38 | 39 | @contextmanager 40 | def capture(command, *args, **kwargs): 41 | out, sys.stdout = sys.stdout, StringIO() 42 | command(*args, **kwargs) 43 | sys.stdout.seek(0) 44 | yield sys.stdout.read() 45 | sys.stdout = out 46 | 47 | 48 | def makemigrations(): 49 | management.call_command('makemigrations') 50 | 51 | @pytest.mark.order(1) 52 | class MigrationTest(TestCase): 53 | 54 | def testPendingMigration(self): 55 | """Make sure there's no pending migration.""" 56 | 57 | with capture(makemigrations) as output: 58 | self.assertEqual(output, "No changes detected\n") 59 | -------------------------------------------------------------------------------- /lib/toaster/tests/eventreplay/README: -------------------------------------------------------------------------------- 1 | # Running eventreplay tests 2 | 3 | These tests use event log files produced by bitbake -w 4 | You need to have event log files produced before running this tests. 5 | 6 | At the moment of writing this document tests use 2 event log files: zlib.events 7 | and core-image-minimal.events. They're not provided with the tests due to their 8 | significant size. 9 | 10 | Here is how to produce them: 11 | 12 | $ . oe-init-build-env 13 | $ rm -r tmp sstate-cache 14 | $ bitbake core-image-minimal -w core-image-minimal.events 15 | $ rm -rf tmp sstate-cache 16 | $ bitbake zlib -w zlib.events 17 | 18 | After that it should be possible to run eventreplay tests this way: 19 | 20 | $ EVENTREPLAY_DIR=./ DJANGO_SETTINGS_MODULE=toastermain.settings_test ../bitbake/lib/toaster/manage.py test -v2 tests.eventreplay 21 | 22 | Note that environment variable EVENTREPLAY_DIR should point to the directory with event log files. 23 | -------------------------------------------------------------------------------- /lib/toaster/tests/functional/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/functional/README -------------------------------------------------------------------------------- /lib/toaster/tests/functional/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/functional/__init__.py -------------------------------------------------------------------------------- /lib/toaster/tests/toaster-tests-requirements.txt: -------------------------------------------------------------------------------- 1 | selenium>=4.13.0 2 | pytest==7.4.2 3 | pytest-django==4.5.2 4 | pytest-env==1.1.0 5 | pytest-html==4.0.2 6 | pytest-metadata==3.0.0 7 | pytest-order==1.1.0 8 | requests 9 | 10 | -------------------------------------------------------------------------------- /lib/toaster/tests/views/README: -------------------------------------------------------------------------------- 1 | 2 | Django unit tests to verify classes and functions based on django Views 3 | 4 | To run just these tests use ./manage.py test tests.views 5 | -------------------------------------------------------------------------------- /lib/toaster/tests/views/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/tests/views/__init__.py -------------------------------------------------------------------------------- /lib/toaster/toastergui/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/__init__.py -------------------------------------------------------------------------------- /lib/toaster/toastergui/forms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # BitBake Toaster UI tests implementation 4 | # 5 | # Copyright (C) 2023 Savoir-faire Linux 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | from django import forms 11 | from django.core.validators import FileExtensionValidator 12 | 13 | class LoadFileForm(forms.Form): 14 | eventlog_file = forms.FileField(widget=forms.FileInput(attrs={'accept': '.json'})) 15 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/jquery.treetable.css: -------------------------------------------------------------------------------- 1 | table.treetable span.indenter { 2 | display: inline-block; 3 | margin: 0; 4 | padding: 0; 5 | text-align: right; 6 | 7 | /* Disable text selection of nodes (for better D&D UX) */ 8 | user-select: none; 9 | -khtml-user-select: none; 10 | -moz-user-select: none; 11 | -o-user-select: none; 12 | -webkit-user-select: none; 13 | 14 | /* Force content-box box model for indenter (Bootstrap compatibility) */ 15 | -webkit-box-sizing: content-box; 16 | -moz-box-sizing: content-box; 17 | box-sizing: content-box; 18 | 19 | width: 19px; 20 | } 21 | 22 | table.treetable span.indenter a { 23 | background-position: left center; 24 | background-repeat: no-repeat; 25 | display: inline-block; 26 | text-decoration: none; 27 | width: 19px; 28 | } 29 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/css/screen.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #ddd; 3 | color: #000; 4 | font-family: Helvetica, Arial, sans-serif; 5 | line-height: 1.5; 6 | margin: 0; 7 | padding: 0; 8 | } 9 | 10 | #main { 11 | background: #fff; 12 | border-left: 20px solid #eee; 13 | border-right: 20px solid #eee; 14 | margin: 0 auto; 15 | max-width: 800px; 16 | padding: 20px; 17 | } 18 | 19 | pre.listing { 20 | background: #eee; 21 | border: 1px solid #ccc; 22 | margin: .6em 0 .3em 0; 23 | padding: .1em .3em; 24 | } 25 | 26 | pre.listing b { 27 | color: #f00; 28 | } 29 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/html/layer_deps_modal.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/img/logo.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/img/toaster_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/static/img/toaster_bw.png -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/jquery-treetable-license/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Ludo van den Boom, http://ludovandenboom.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/jquery-treetable-license/README.md: -------------------------------------------------------------------------------- 1 | # jQuery treetable 2 | 3 | jQuery treetable is a plugin for jQuery, the 'Write Less, Do More, JavaScript 4 | Library'. With this plugin you can display a tree in an HTML table, e.g. a 5 | directory structure or a nested list. Why not use a list, you say? Because lists 6 | are great for displaying a tree, and tables are not. Oh wait, but this plugin 7 | uses tables, doesn't it? Yes. Why do I use a table to display a list? Because I 8 | need multiple columns to display additional data besides the tree. 9 | 10 | Download the latest release from the jQuery Plugin Registry or grab the source 11 | code from Github. Please report issues through Github issues. This plugin is 12 | released under both the MIT and the GPLv2 license by Ludo van den Boom. 13 | 14 | ## Documentation and Examples 15 | 16 | See index.html for technical documentation and examples. The most recent version 17 | of this document is also available online at 18 | http://ludo.cubicphuse.nl/jquery-treetable. An AJAX enabled example built with 19 | Ruby on Rails can be found at 20 | https://github.com/ludo/jquery-treetable-ajax-example. 21 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly" : false, 3 | "predef" : [ "$","libtoaster", "prettyPrint" ], 4 | "eqnull": true, 5 | "plusplus" : false, 6 | "browser" : true, 7 | "jquery" : true, 8 | "devel" : true, 9 | "unused" : true, 10 | "maxerr" : 60 11 | } 12 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/static/js/recipedetails.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function recipeDetailsPageInit(ctx){ 4 | 5 | $(".customise-btn").click(function(e){ 6 | e.preventDefault(); 7 | var imgCustomModal = $("#new-custom-image-modal"); 8 | 9 | if (imgCustomModal.length === 0) 10 | throw("Modal new-custom-image not found"); 11 | 12 | var recipe = {id: $(this).data('recipe'), name: null} 13 | newCustomImageModalSetRecipes([recipe]); 14 | imgCustomModal.modal('show'); 15 | }); 16 | 17 | $("#add-layer-btn").click(function(){ 18 | var btn = $(this); 19 | 20 | libtoaster.addRmLayer(ctx.recipe.layer_version, 21 | true, 22 | function (layersList){ 23 | var msg = libtoaster.makeLayerAddRmAlertMsg(ctx.recipe.layer_version, 24 | layersList, 25 | true); 26 | 27 | libtoaster.showChangeNotification(msg); 28 | 29 | var toShow = $("#customise-build-btns"); 30 | 31 | /* If we have no packages built yet also fade in the build packages 32 | * hint message 33 | */ 34 | if (ctx.recipe.totalPackages === 0){ 35 | toShow = toShow.add("#build-to-get-packages-msg"); 36 | } 37 | 38 | $("#packages-alert").add(btn).fadeOut(function(){ 39 | toShow.fadeIn(); 40 | }); 41 | }); 42 | }); 43 | 44 | /* Trigger a build of your custom image */ 45 | $(".build-recipe-btn").click(function(){ 46 | libtoaster.startABuild(null, ctx.recipe.name, 47 | function(){ 48 | window.location.replace(libtoaster.ctx.projectBuildsUrl); 49 | }); 50 | }); 51 | } 52 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/basebuilddetailpage.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load project_url_tag %} 3 | {% load humanize %} 4 | {% block pagecontent %} 5 | 6 |
    7 | 8 |
    9 | 17 | 24 |
    25 |
    26 | 27 | 28 | {% block pagedetailinfomain %}{% endblock %} 29 | 30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/baseprojectbuildspage.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load projecttags %} 3 | {% load humanize %} 4 | {% block pagecontent %} 5 | 6 | {% include "projecttopbar.html" %} 7 | 8 | 9 |
    10 | {% block projectinfomain %}{% endblock %} 11 |
    12 | 13 | 14 | {% endblock %} 15 | 16 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/baseprojectpage.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% load projecttags %} 4 | {% load humanize %} 5 | 6 | {% block title %} {{title}} - {{project.name}} - Toaster {% endblock %} 7 | 8 | {% block pagecontent %} 9 | 10 |
    11 | {% include "projecttopbar.html" %} 12 | 24 | 25 | 26 |
    27 | 45 |
    46 |
    47 | {% block projectinfomain %}{% endblock %} 48 |
    49 | 50 |
    51 | {% endblock %} 52 | 53 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/baseprojectspecificpage.html: -------------------------------------------------------------------------------- 1 | {% extends "base_specific.html" %} 2 | 3 | {% load projecttags %} 4 | {% load humanize %} 5 | 6 | {% block title %} {{title}} - {{project.name}} - Toaster {% endblock %} 7 | 8 | {% block pagecontent %} 9 | 10 |
    11 | {% include "project_specific_topbar.html" %} 12 | 24 | 25 | 26 |
    27 | 41 |
    42 |
    43 | {% block projectinfomain %}{% endblock %} 44 |
    45 | 46 |
    47 | {% endblock %} 48 | 49 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/basetable_top_layers.html: -------------------------------------------------------------------------------- 1 | {% extends "basetable_top.html" %} 2 | 3 | {%block custombuttons %} 4 | Import layer 5 | {%endblock%} 6 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/bfile.html: -------------------------------------------------------------------------------- 1 | {% extends "basebuildpage.html" %} 2 | 3 | {% block pagetitle %}Files for package {{objects.0.bpackage.name}} {% endblock %} 4 | {% block pagetable %} 5 | {% if not objects %} 6 |

    No files were recorded for this package!

    7 | {% else %} 8 | 9 | 10 | Name 11 | Size (Bytes) 12 | 13 | 14 | {% for file in objects %} 15 | 16 | 17 | {{file.path}} 18 | {{file.size}} 19 | 20 | {% endfor %} 21 | 22 | {% endif %} 23 | 24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/brtargets.html: -------------------------------------------------------------------------------- 1 | 1 %} 3 | title="Targets: 4 | {% for target in buildrequest.brtarget_set.all %} 5 | {% if target.task %} 6 | {{target.target}}:{{target.task}} 7 | {% else %} 8 | {{target.target}} 9 | {% endif %} 10 | {%endfor%}" 11 | {%endif%}> 12 | {% if buildrequest.brtarget_set.all.0.task %} 13 | {{buildrequest.brtarget_set.all.0.target}}:{{buildrequest.brtarget_set.all.0.task}} 14 | {% else %} 15 | {{buildrequest.brtarget_set.all.0.target}} 16 | {% endif %} 17 | {% if buildrequest.brtarget_set.all.count > 1 %} 18 | (+ {{buildrequest.brtarget_set.all.count|add:"-1"}}) 19 | {% endif %} 20 | 21 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/buildinfo-toastertable.html: -------------------------------------------------------------------------------- 1 | {% extends "basebuildpage.html" %} 2 | 3 | {% load projecttags %} 4 | 5 | {% block title %} {{title}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %} 6 | {% block localbreadcrumb %} 7 |
  • {{title}}
  • 8 | {% endblock %} 9 | 10 | {% block nav-packages %} 11 | {% endblock %} 12 | 13 | {% block buildinfomain %} 14 |
    15 | {# xhr_table_url is just the current url so leave it blank #} 16 | {% with xhr_table_url='' %} 17 | 22 | {% include "toastertable.html" %} 23 | {% endwith %} 24 |
    25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/builds-toastertable.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load static %} 3 | 4 | {% block extraheadcontent %} 5 | 6 | 7 | 8 | 10 | {% endblock %} 11 | 12 | {% block title %} All builds - Toaster {% endblock %} 13 | 14 | {% block pagecontent %} 15 | 16 |
    17 |
    18 | {% with mru=mru mrb_type=mrb_type %} 19 | {% include 'mrb_section.html' %} 20 | {% endwith %} 21 | 22 | 25 | 26 | {% url 'builds' as xhr_table_url %} 27 | {% include 'toastertable.html' %} 28 |
    29 |
    30 | 31 | 52 | {% endblock %} 53 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/cpuusage.html: -------------------------------------------------------------------------------- 1 | {% extends "basebuildpage.html" %} 2 | {% block localbreadcrumb %} 3 |
  • Cpu Usage
  • 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/customise_btn.html: -------------------------------------------------------------------------------- 1 | 8 | 20 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/detail_pagination_bottom.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Show pagination controls as per search/pagination table detail spec. 3 | Input: objects, setup for pagination using the standard method in views. 4 | object_count, count for complete list of objects, (all pages, no pattern) 5 | {% endcomment %} 6 | 7 | {# only paginate if 10 or more rows unfiltered, all pages #} 8 | {% if object_count >= 10 %} 9 |
    10 |
      11 | {%if objects.has_previous %} 12 |
    • «
    • 13 | {%else%} 14 |
    • «
    • 15 | {%endif%} 16 | {% for i in objects.page_range %} 17 | {{i}} 18 | {% endfor %} 19 | {%if objects.has_next%} 20 |
    • »
    • 21 | {%else%} 22 |
    • »
    • 23 | {%endif%} 24 |
    25 | 26 | 38 |
    39 | 40 | 41 | 56 | {% endif %} 57 | 58 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/detail_sorted_header.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Adds sorted columns to a detail table. 3 | Must be preceded by 4 | Must be followed by ...
    . 5 | Requires tablecols setup column fields dclass, clclass, qhelp, orderfield. 6 | {% endcomment %} 7 | {% load projecttags %} 8 | {# #} 9 | 10 | 11 | 12 | {% for tc in tablecols %}{% endfor %} 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/diskio.html: -------------------------------------------------------------------------------- 1 | {% extends "basebuildpage.html" %} 2 | {% block localbreadcrumb %} 3 |
  • Disk I/O
  • 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/distro_btn.html: -------------------------------------------------------------------------------- 1 | 6 | 20 | 21 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/generic-toastertable-page.html: -------------------------------------------------------------------------------- 1 | {% extends project_specific|yesno:"baseprojectspecificpage.html,baseprojectpage.html" %} 2 | {% load projecttags %} 3 | {% load humanize %} 4 | {% load static %} 5 | 6 | {% block projectinfomain %} 7 | 8 |

    {{title}} () 9 | {% if project.release %} 10 | 11 | {% endif %} 12 |

    13 | 14 | {% url table_name project.id as xhr_table_url %} 15 | {% include "toastertable.html" %} 16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/health.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Toaster Health 4 | Ok 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/js-unit-tests.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load projecttags %} 3 | {% load humanize %} 4 | {% load static %} 5 | {% block pagecontent %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 |
    33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | {% endblock %} 48 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/landing_specific.html: -------------------------------------------------------------------------------- 1 | {% extends "base_specific.html" %} 2 | 3 | {% load static %} 4 | {% load projecttags %} 5 | {% load humanize %} 6 | 7 | {% block title %} Welcome to Toaster {% endblock %} 8 | 9 | {% block pagecontent %} 10 | 11 |
    12 |
    13 | 14 | 19 |
    20 |

    21 | Your project configuration {% if status == "cancel" %}changes have been canceled{% else %}has completed!{% endif %} 22 |
    23 |
    24 |

      25 |
    • 26 | The Toaster instance for project configuration has been shut down 27 |
    • 28 |
    • 29 | You can start Toaster independently for advanced project management and analysis: 30 |
      
      31 |          Set up bitbake environment:
      32 |          $ cd {{install_dir}}
      33 |          $ . oe-init-build-env [toaster_server]
      34 | 
      35 |          Option 1: Start a local Toaster server, open local browser to "localhost:8000"
      36 |          $ . toaster start webport=8000
      37 | 
      38 |          Option 2: Start a shared Toaster server, open any browser to "[host_ip]:8000"
      39 |          $ . toaster start webport=0.0.0.0:8000
      40 | 
      41 |          To stop the Toaster server:
      42 |          $ . toaster stop
      43 |          
      44 |
    • 45 |
    46 |

    47 |
    48 |
    49 | 50 | {% endblock %} 51 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/layer_btn.html: -------------------------------------------------------------------------------- 1 | 14 | 27 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/machine_btn.html: -------------------------------------------------------------------------------- 1 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/newcustomimage.html: -------------------------------------------------------------------------------- 1 | {% extends project_specific|yesno:"baseprojectspecificpage.html,base.html" %} 2 | {% load projecttags %} 3 | {% load humanize %} 4 | {% load static %} 5 | {% block pagecontent %} 6 | 7 | {% include "newcustomimage_modal.html" %} 8 | 9 |
    10 | 11 | {% include project_specific|yesno:"project_specific_topbar.html,projecttopbar.html" %} 12 | 13 |
    14 | {% url table_name project.id as xhr_table_url %} 15 |

    {{title}} (0)

    16 | {% include "toastertable.html" %} 17 |
    18 | 19 |
    20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/package_included_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "package_detail_base.html" %} 2 | {% load projecttags %} 3 | 4 | {% block mainheading %} 5 |

    6 | {{package.fullpackagespec}} 7 | 10 | ({{target.target}}) 11 |

    12 | {% endblock %} 13 | 14 | {% block tabcontent %} 15 | {% with packageFileCount=package.buildfilelist_package.count %} 16 | {% include "package_included_tabs.html" with active_tab="detail" %} 17 |
    18 |
    19 | {% if packageFileCount > 0 %} 20 | {% include "tablesort.html" %} 21 |
    22 | {% for file in objects %} 23 | 24 | 29 | 30 | 31 | {% endfor %} 32 | 33 |
    13 | {%if tc.qhelp%}{%endif%} 14 | {%if tc.orderfield%}{{tc.name}}{%else%}{{tc.name}}{%endif%} 15 | {%if tc.ordericon%} {%endif%} 16 | {% if request.GET.search and forloop.first %} 17 | {{objects.paginator.count}} 18 | {% endif %} 19 | {%if tc.filter%}
    20 | 21 |
    {%endif%} 22 |
    25 | 26 | {{file.path}} 27 | 28 | {{file.size|filtered_filesizeformat}}
    34 | 35 | {% else %} 36 |
    37 | {{package.fullpackagespec}} does not generate any files. 38 |
    39 | {% endif %} 40 | 41 | 42 | 43 | {% endwith %} 44 | {% endblock tabcontent %} 45 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/package_included_reverse_dependencies.html: -------------------------------------------------------------------------------- 1 | {% extends "package_detail_base.html" %} 2 | {% load projecttags %} 3 | 4 | {% block mainheading %} 5 |

    6 | {{package.fullpackagespec}} 7 | 8 | ({{target.target}}) 9 |

    10 | {% endblock %} 11 | 12 | {% block tabcontent %} 13 | {% with packageFileCount=package.buildfilelist_package.count %} 14 | {% include "package_included_tabs.html" with active_tab="reverse" %} 15 |
    16 |
    17 | 18 | {% if reverse_count == 0 %} 19 |
    20 | {{package.fullpackagespec}} has no reverse runtime dependencies. 21 |
    22 | {% else %} 23 | {% include "tablesort.html" %} 24 | 25 | {% for reverse_dep in objects %} 26 | 27 | {% if reverse_dep.size != -1 %} 28 | 29 | 30 | {{reverse_dep.package.name}} 31 | 32 | 33 | 34 | {% else %} 35 | 36 | {{reverse_dep.name|format_vpackage_namehelp}} 37 | 38 | {% endif %} 39 | 40 | {{reverse_dep.package.version}}  41 | {{reverse_dep.package.size|filtered_filesizeformat}}  42 | 43 | {% endfor %} 44 | 45 | 46 | {% endif %} 47 |
    48 |
    49 | {% endwith %} 50 | {% endblock tabcontent %} 51 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/package_included_tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 34 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/pkg_add_rm_btn.html: -------------------------------------------------------------------------------- 1 | {# TODO move to snippets dir #} 2 | {% if data.is_locale_package %} 3 |

    4 | Locale package 5 | 10 |

    11 | 12 | {% else %} 13 | 14 |
    15 | 16 | 24 | 32 |
    33 | 34 | {% endif %} 35 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/projectbuilds-toastertable.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% load static %} 4 | 5 | {% block extraheadcontent %} 6 | 7 | 8 | 9 | 11 | {% endblock %} 12 | 13 | {% block title %} {{title}} - {{project.name}} - Toaster {% endblock %} 14 | 15 | {% block pagecontent %} 16 |
    17 | 18 | {% include "projecttopbar.html" %} 19 | 20 |
    21 | {% with mru=mru mrb_type=mrb_type %} 22 | {% include 'mrb_section.html' %} 23 | {% endwith %} 24 | 25 |

    26 | 27 | {% if not build_in_progress_none_completed %} 28 | {% url 'projectbuilds' project.id as xhr_table_url %} 29 | {% include 'toastertable.html' %} 30 | {% endif %} 31 |
    32 | 33 | 63 | 64 |
    65 | {% endblock %} 66 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/projects-toastertable.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} All projects - Toaster {% endblock %} 4 | 5 | {% block pagecontent %} 6 | 7 |
    8 |
    9 | 10 | 13 | 14 | {% url 'projects' as xhr_table_url %} 15 | {% include 'toastertable.html' %} 16 | 17 | 38 | 39 |
    40 |
    41 | 42 | {% endblock %} 43 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/recipe_add_btn.html: -------------------------------------------------------------------------------- 1 | 6 | Set recipe 7 | 8 | 24 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/recipe_btn.html: -------------------------------------------------------------------------------- 1 | 6 | Build recipe 7 | 8 | 24 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/snippets/gitrev_popover.html: -------------------------------------------------------------------------------- 1 | {% load projecttags %} 2 | {% if vcs_ref|is_shaid %} 3 | 4 | {{vcs_ref|truncatechars:10}} 5 | 6 | {% else %} 7 | {{vcs_ref}} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html: -------------------------------------------------------------------------------- 1 | {# Popover that displays the dependences and sizes of a package 'data' used in the Packages table #} 2 | {% load projecttags %} 3 | 4 | {% with package_deps=data.package_dependencies_source|for_target:extra.target_name %} 5 | {% with count_package=package_deps.packages|length %} 6 | 7 | {% if count_package > 0 %} 8 | 13 | {{dep.depends_on.name}} 14 | {% else %} 15 | {{dep.depends_on.name}} 16 | {% endif %} 17 | {% if dep.depends_on.size > 0 %} 18 | ({{dep.depends_on.size|filtered_filesizeformat}}) 19 | {% endif %} 20 | 21 | {% endfor %} 22 | ' class="btn btn-default" title=' 23 | 24 | {% if extra.add_links %} 25 | 26 | {{data.name}} 27 | {% else %} 28 | {{data.name}} 29 | {% endif %} 30 | 31 | dependencies - 32 | {{package_deps.size|filtered_filesizeformat}}'> 33 | {{count_package}} 34 | 35 | {% endif %} 36 | 37 | {% endwith %} 38 | {% endwith %} 39 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html: -------------------------------------------------------------------------------- 1 | {# Popover that displays the reverse dependences and sizes of a package 'data' used in the Packages table #} 2 | {% load projecttags %} 3 | 4 | {% with package_deps=data.package_dependencies_target|for_target:extra.target_name %} 5 | {% with count_package=package_deps.packages|length %} 6 | 7 | {% if count_package > 0 %} 8 | 13 | {{dep.package.name}} 14 | {% else %} 15 | {{dep.package.name}} 16 | {% endif %} 17 | {% if dep.package.size > 0 %} 18 | ({{dep.package.size|filtered_filesizeformat}}) 19 | {% endif %} 20 | 21 | {% endfor %} 22 | ' class="btn btn-default" title=' 23 | 24 | {% if extra.add_links %} 25 | 26 | {{data.name}} 27 | {% else %} 28 | {{data.name}} 29 | {% endif %} 30 | 31 | dependencies - 32 | {{package_deps.size|filtered_filesizeformat}}'> 33 | {{count_package}} 34 | 35 | {% endif %} 36 | 37 | {% endwith %} 38 | {% endwith %} 39 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/tablesort.html: -------------------------------------------------------------------------------- 1 | {% load projecttags %} 2 | 3 | {% if disable_sort %} 4 | 5 | 6 | 7 | {% for tc in tablecols %} 8 | 12 | {% endfor %} 13 | 14 | 15 | {% else %} 16 |
    9 | {%if tc.qhelp%}{%endif%} 10 | {{tc.name}} 11 |
    17 | 18 | 19 | 20 | {% for tc in tablecols %} 21 | 35 | {% endfor %} 36 | 37 | 38 | {% endif %} 39 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/toastertable-filter.html: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templates/unavailable_artifact.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load projecttags %} 3 | {% load humanize %} 4 | {% load static %} 5 | 6 | {% block title %} Build artifact does not exist - Toaster {% endblock %} 7 | 8 | {% block pagecontent %} 9 |
    10 |
    11 |
    12 |

    The build artifact you are trying to download does not exist.

    13 |

    Back to previous page

    14 |
    15 |
    16 |
    17 | {% endblock %} 18 | 19 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastergui/templatetags/__init__.py -------------------------------------------------------------------------------- /lib/toaster/toastergui/templatetags/field_values_filter.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | from django import template 6 | 7 | register = template.Library() 8 | 9 | def field_values(iterable, field): 10 | """ 11 | Convert an iterable of models into a list of strings, one for each model, 12 | where the string for each model is the value of the field "field". 13 | """ 14 | objects = [] 15 | 16 | if field: 17 | for item in iterable: 18 | objects.append(getattr(item, field)) 19 | 20 | return objects 21 | 22 | register.filter('field_values', field_values) -------------------------------------------------------------------------------- /lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | from django import template 6 | 7 | register = template.Library() 8 | 9 | def objects_to_dictionaries(iterable, fields): 10 | """ 11 | Convert an iterable into a list of dictionaries; fields should be set 12 | to a comma-separated string of properties for each item included in the 13 | resulting list; e.g. for a queryset: 14 | 15 | {{ queryset | objects_to_dictionaries:"id,name" }} 16 | 17 | will return a list like 18 | 19 | [{'id': 1, 'name': 'foo'}, ...] 20 | 21 | providing queryset has id and name fields 22 | 23 | This is mostly to support serialising querysets or lists of model objects 24 | to JSON 25 | """ 26 | objects = [] 27 | 28 | if fields: 29 | fields_list = [field.strip() for field in fields.split(',')] 30 | for item in iterable: 31 | out = {} 32 | for field in fields_list: 33 | out[field] = getattr(item, field) 34 | objects.append(out) 35 | 36 | return objects 37 | 38 | register.filter('objects_to_dictionaries', objects_to_dictionaries) 39 | -------------------------------------------------------------------------------- /lib/toaster/toastergui/templatetags/project_url_tag.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | from django import template 6 | from django.urls import reverse 7 | 8 | register = template.Library() 9 | 10 | def project_url(parser, token): 11 | """ 12 | Create a URL for a project's main page; 13 | for non-default projects, this is the configuration page; 14 | for the default project, this is the project builds page 15 | """ 16 | try: 17 | tag_name, project = token.split_contents() 18 | except ValueError: 19 | raise template.TemplateSyntaxError( 20 | "%s tag requires exactly one argument" % tag_name 21 | ) 22 | return ProjectUrlNode(project) 23 | 24 | class ProjectUrlNode(template.Node): 25 | def __init__(self, project): 26 | self.project = template.Variable(project) 27 | 28 | def render(self, context): 29 | try: 30 | project = self.project.resolve(context) 31 | if project.is_default: 32 | return reverse('projectbuilds', args=(project.id,)) 33 | else: 34 | return reverse('project', args=(project.id,)) 35 | except template.VariableDoesNotExist: 36 | return '' 37 | 38 | register.tag('project_url', project_url) 39 | -------------------------------------------------------------------------------- /lib/toaster/toastermain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastermain/__init__.py -------------------------------------------------------------------------------- /lib/toaster/toastermain/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastermain/management/__init__.py -------------------------------------------------------------------------------- /lib/toaster/toastermain/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openembedded/bitbake/22011765202514600314732b97f1bb938e21f585/lib/toaster/toastermain/management/commands/__init__.py -------------------------------------------------------------------------------- /lib/toaster/toastermain/management/commands/buildslist.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | from django.core.management.base import BaseCommand 6 | from orm.models import Build 7 | 8 | 9 | 10 | class Command(BaseCommand): 11 | args = "" 12 | help = "Lists current builds" 13 | 14 | def handle(self,**options): 15 | for b in Build.objects.all(): 16 | print("%d: %s %s %s" % (b.pk, b.machine, b.distro, ",".join([x.target for x in b.target_set.all()]))) 17 | -------------------------------------------------------------------------------- /lib/toaster/toastermain/management/commands/checksocket.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # BitBake Toaster Implementation 4 | # 5 | # Copyright (C) 2015 Intel Corporation 6 | # 7 | # SPDX-License-Identifier: GPL-2.0-only 8 | # 9 | 10 | """Custom management command checksocket.""" 11 | 12 | import errno 13 | import socket 14 | 15 | from django.core.management.base import BaseCommand, CommandError 16 | from django.utils.encoding import force_str 17 | 18 | DEFAULT_ADDRPORT = "0.0.0.0:8000" 19 | 20 | class Command(BaseCommand): 21 | """Custom management command.""" 22 | 23 | help = 'Check if Toaster can listen on address:port' 24 | 25 | def add_arguments(self, parser): 26 | parser.add_argument('addrport', nargs='?', default=DEFAULT_ADDRPORT, 27 | help='ipaddr:port to check, %s by default' % \ 28 | DEFAULT_ADDRPORT) 29 | 30 | def handle(self, *args, **options): 31 | addrport = options['addrport'] 32 | if ':' not in addrport: 33 | raise CommandError('Invalid addr:port specified: %s' % addrport) 34 | splitted = addrport.split(':') 35 | try: 36 | splitted[1] = int(splitted[1]) 37 | except ValueError: 38 | raise CommandError('Invalid port specified: %s' % splitted[1]) 39 | self.stdout.write('Check if toaster can listen on %s' % addrport) 40 | try: 41 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 42 | sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 43 | sock.bind(tuple(splitted)) 44 | except (socket.error, OverflowError) as err: 45 | errors = { 46 | errno.EACCES: 'You don\'t have permission to access port %s' \ 47 | % splitted[1], 48 | errno.EADDRINUSE: 'Port %s is already in use' % splitted[1], 49 | errno.EADDRNOTAVAIL: 'IP address can\'t be assigned to', 50 | } 51 | if hasattr(err, 'errno') and err.errno in errors: 52 | errtext = errors[err.errno] 53 | else: 54 | errtext = force_str(err) 55 | raise CommandError(errtext) 56 | 57 | self.stdout.write("OK") 58 | -------------------------------------------------------------------------------- /lib/toaster/toastermain/settings_production_example.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake Toaster Implementation 3 | # 4 | # Copyright (C) 2016 Intel Corporation 5 | # 6 | # SPDX-License-Identifier: GPL-2.0-only 7 | # 8 | 9 | # See Django documentation for more information about deployment 10 | # https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ 11 | 12 | # Toaster production settings example overlay 13 | # To use this copy this example to "settings_production.py" and set in your 14 | # environment DJANGO_SETTINGS_MODULE=toastermain.settings_production 15 | # This can be permanently set in a new .wsgi file 16 | 17 | from toastermain.settings import * # NOQA 18 | 19 | # Set this value! 20 | SECRET_KEY = None 21 | 22 | # Switch off any debugging 23 | DEBUG = True 24 | TEMPLATE_DEBUG = DEBUG 25 | 26 | DATABASES = { 27 | 'default': { 28 | 'ENGINE': 'django.db.backends.mysql', 29 | 'NAME': 'toaster_data', 30 | 'USER': 'toaster', 31 | 'PASSWORD': 'yourpasswordhere', 32 | 'HOST': '127.0.0.1', 33 | 'PORT': '3306', 34 | } 35 | } 36 | 37 | # Location where static files will be placed by "manage.py collectstatic" 38 | STATIC_ROOT = '/var/www/static-toaster/' 39 | 40 | # URL prefix for static files. 41 | STATIC_URL = '/static-toaster/' 42 | 43 | # Hosts that Django will serve 44 | # https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-ALLOWED_HOSTS 45 | ALLOWED_HOSTS = ['toaster-example.example.com'] 46 | -------------------------------------------------------------------------------- /lib/toaster/toastermain/settings_test.py: -------------------------------------------------------------------------------- 1 | # 2 | # BitBake Toaster Implementation 3 | # 4 | # Copyright (C) 2016 Intel Corporation 5 | # 6 | # SPDX-License-Identifier: GPL-2.0-only 7 | # 8 | 9 | # Django settings for Toaster project. 10 | 11 | # Settings overlay to use for running tests 12 | # DJANGO_SETTINGS_MODULE=toastermain.settings-test 13 | 14 | from toastermain.settings import * 15 | 16 | DEBUG = True 17 | TEMPLATE_DEBUG = DEBUG 18 | 19 | DATABASES = { 20 | 'default': { 21 | 'ENGINE': 'django.db.backends.sqlite3', 22 | 'NAME': '%s/toaster-test-db.sqlite' % TMPDIR, 23 | 'TEST': { 24 | 'ENGINE': 'django.db.backends.sqlite3', 25 | 'NAME': '%s/toaster-test-db.sqlite' % TMPDIR, 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/toaster/toastermain/wsgi.py: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-License-Identifier: GPL-2.0-only 3 | # 4 | 5 | """ 6 | WSGI config for Toaster project. 7 | 8 | This module contains the WSGI application used by Django's development server 9 | and any production WSGI deployments. It should expose a module-level variable 10 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover 11 | this application via the ``WSGI_APPLICATION`` setting. 12 | 13 | Usually you will have the standard Django WSGI application here, but it also 14 | might make sense to replace the whole Django WSGI application with a custom one 15 | that later delegates to the Django one. For example, you could introduce WSGI 16 | middleware here, or combine a Django application with an application of another 17 | framework. 18 | 19 | """ 20 | import os 21 | 22 | # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks 23 | # if running multiple sites in the same mod_wsgi process. To fix this, use 24 | # mod_wsgi daemon mode with each site in its own daemon process, or use 25 | # os.environ["DJANGO_SETTINGS_MODULE"] = "Toaster.settings" 26 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings") 27 | 28 | # This application object is used by any WSGI server configured to use this 29 | # file. This includes Django's development server, if the WSGI_APPLICATION 30 | # setting points here. 31 | from django.core.wsgi import get_wsgi_application 32 | application = get_wsgi_application() 33 | 34 | # Apply WSGI middleware here. 35 | # from helloworld.wsgi import HelloWorldApplication 36 | # application = HelloWorldApplication(application) 37 | -------------------------------------------------------------------------------- /lib/toaster/tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py38, py39, py310, py311, py312 3 | skipsdist = True 4 | toxworkdir = {env:TOX_WORKDIR:.tox} 5 | passenv = * 6 | 7 | [testenv] 8 | passenv = 9 | SSTATE_DIR 10 | DL_DIR 11 | TOASTER_DJANGO_TMPDIR 12 | setenv = 13 | DJANGO_SETTINGS_MODULE=toastermain.settings_test 14 | TOASTER_BUILDSERVER=1 15 | BUILDDIR = {env:BUILDDIR} 16 | EVENTREPLAY_DIR = {env:EVENTREPLAY_DIR:BUILDDIR} 17 | commands = 18 | python3 {toxinidir}/manage.py test tests.db tests.commands tests.builds tests.browser tests.functional tests.views 19 | deps = 20 | -r {toxinidir}/../../toaster-requirements.txt 21 | -r {toxinidir}/tests/toaster-tests-requirements.txt 22 | 23 | [testenv:chrome] 24 | commands={[testenv]commands} --splinter-webdriver=chrome -------------------------------------------------------------------------------- /toaster-requirements.txt: -------------------------------------------------------------------------------- 1 | Django>4.2,<4.3 2 | beautifulsoup4>=4.4.0 3 | pytz 4 | django-log-viewer==1.1.7 5 | --------------------------------------------------------------------------------
    22 | {%if tc.qhelp%}{%endif%} 23 | {%if tc.orderfield%} 24 | 26 | {{tc.name}} 27 | 28 | {%else%} 29 | 30 | {{tc.name}} 31 | 32 | {%endif%} 33 | {%if tc.ordericon%} {%endif%} 34 |