├── docs ├── .build │ └── __init__.py └── main │ └── Connectors.rst ├── fedoracommunity ├── lib │ ├── base.py │ ├── __init__.py │ └── app_globals.py ├── config │ ├── __init__.py │ ├── environment.py │ ├── middleware.py │ └── app_cfg.py ├── plugins │ ├── __init__.py │ └── extensions │ │ ├── __init__.py │ │ ├── make_menu.js │ │ ├── test.js │ │ └── groupalerts.js ├── search │ ├── __init__.py │ ├── utils.py │ └── distmappings.py ├── templates │ ├── __init__.py │ ├── chrome.mak │ ├── index.mak │ ├── error.mak │ ├── footer.mak │ ├── search.mak │ └── header.mak ├── controllers │ ├── __init__.py │ └── root.py ├── widgets │ ├── templates │ │ ├── __init__.py │ │ └── widget_loader.mak │ ├── package │ │ ├── templates │ │ │ ├── __init__.py │ │ │ ├── git.mak │ │ │ ├── diffs.mak │ │ │ ├── bugs.mak │ │ │ ├── builds.mak │ │ │ ├── changelog.mak │ │ │ ├── problems.mak │ │ │ ├── overview.mak │ │ │ ├── updates.mak │ │ │ ├── release_filter.mak │ │ │ ├── diffstat.mak │ │ │ ├── package_spec.mak │ │ │ ├── patch.mak │ │ │ ├── active_releases.mak │ │ │ ├── tarballs.mak │ │ │ ├── provides_table_widget.mak │ │ │ ├── conflicts_table_widget.mak │ │ │ ├── obsoletes_table_widget.mak │ │ │ ├── required_by_table_widget.mak │ │ │ ├── problems_table_widget.mak │ │ │ ├── requires_table_widget.mak │ │ │ ├── bugs_stats_widget.mak │ │ │ ├── patches.mak │ │ │ ├── tabs.mak │ │ │ ├── contents.mak │ │ │ ├── package_chrome.mak │ │ │ ├── changelog_table_widget.mak │ │ │ ├── updates_table_widget.mak │ │ │ ├── bugs_table_widget.mak │ │ │ └── details.mak │ │ ├── __init__.py │ │ ├── problems.py │ │ ├── contents.py │ │ ├── changelog.py │ │ ├── builds.py │ │ ├── updates.py │ │ ├── overview.py │ │ ├── bugs.py │ │ └── package.py │ ├── search │ │ ├── templates │ │ │ ├── __init__.py │ │ │ └── search_results.mak │ │ ├── __init__.py │ │ └── search_grid.py │ ├── __init__.py │ ├── jquery_template.py │ ├── expander.py │ ├── tree.py │ ├── widgets.py │ ├── grid.py │ └── static │ │ └── javascript │ │ ├── ui │ │ └── moksha.ui.popup.js │ │ └── jquery.expander.js ├── __init__.py ├── connectors │ ├── widgets │ │ ├── __init__.py │ │ ├── widgets.py │ │ └── static │ │ │ └── js │ │ │ └── fcomm.js │ ├── __init__.py │ ├── api │ │ └── __init__.py │ ├── jsonconnector.py │ └── fafconnector.py ├── public │ ├── favicon.ico │ ├── images │ │ ├── ok.png │ │ ├── info.png │ │ ├── line.png │ │ ├── 16-fas.png │ │ ├── 16_abrt.png │ │ ├── 16_bugs.png │ │ ├── 16_chat.png │ │ ├── 16_koji.png │ │ ├── 16_mail.png │ │ ├── bugfix.png │ │ ├── favicon.ico │ │ ├── geiger.png │ │ ├── laser.png │ │ ├── spinner.gif │ │ ├── testing.png │ │ ├── tg2_04.gif │ │ ├── 16_active.png │ │ ├── 16_bodhi.png │ │ ├── 16_clock.png │ │ ├── 16_fedora.png │ │ ├── 16_globe.png │ │ ├── 16_phone.png │ │ ├── 16_pkgdb.png │ │ ├── 16_tagger.png │ │ ├── arrow_up.png │ │ ├── nav_arrow.png │ │ ├── panda-wee.png │ │ ├── repeater.png │ │ ├── security.png │ │ ├── 16_bugzilla.png │ │ ├── 16_failured.png │ │ ├── 16_inactive.png │ │ ├── 16_karma-bad.png │ │ ├── 16_karma-meh.png │ │ ├── 16_package.png │ │ ├── 16_sources.png │ │ ├── 16_success.png │ │ ├── 16_transifex.png │ │ ├── arrow_down.png │ │ ├── border-left.png │ │ ├── border-right.png │ │ ├── c8c8c8_dot.png │ │ ├── enhancement.png │ │ ├── header-tab1.png │ │ ├── header-tab2.png │ │ ├── header_inner.png │ │ ├── spinner-20.gif │ │ ├── spinner-old.gif │ │ ├── 16_karma-good.png │ │ ├── grad_blue_7x80.png │ │ ├── 16_announcement.png │ │ ├── 16_build_state_0.png │ │ ├── 16_build_state_1.png │ │ ├── 16_build_state_2.png │ │ ├── 16_build_state_3.png │ │ ├── 16_build_state_4.png │ │ ├── 16_failure_build.png │ │ ├── 16_offsite-link.png │ │ ├── 16_package_bugfix.png │ │ ├── 16_status-success.png │ │ ├── 16_success_build.png │ │ ├── banners │ │ │ ├── paintain.png │ │ │ ├── banner-tour-menu.png │ │ │ └── main-banner_tour-promo.png │ │ ├── grad_grey_1x116.png │ │ ├── grad_grey_1x225.png │ │ ├── list_tree_marker.png │ │ ├── package_128x128.png │ │ ├── tg_under_the_hood.png │ │ ├── vertical-gradient.png │ │ ├── 16_in_progress_anim.gif │ │ ├── 16_package_security.png │ │ ├── 16_status-attention.png │ │ ├── grad_orange_11x100.png │ │ ├── planet-bubbles │ │ │ ├── top.png │ │ │ ├── vert.png │ │ │ ├── bottom.png │ │ │ ├── corners.png │ │ │ ├── horiz.png │ │ │ └── point.png │ │ ├── under_the_hood_blue.png │ │ ├── 16_package_enhancement.png │ │ ├── 16_package_newpackage.png │ │ ├── action-box_add-button.png │ │ ├── fedora-community-logo.png │ │ ├── fedora_intro_banner1.png │ │ ├── fedora_packages_logo.png │ │ ├── text_entry_drop_shadow.png │ │ ├── 16_build_state_${state}.png │ │ ├── 16_karma-${karma_level}.png │ │ ├── Powered-by-moksha_button.png │ │ ├── count-box-gradient_dark.png │ │ ├── count-box-gradient_light.png │ │ ├── fedora-packges_logo-white.png │ │ └── tour │ │ │ ├── illustration_people-details.png │ │ │ ├── illustration_search-fedora.png │ │ │ ├── screenshots │ │ │ ├── packages_builds.png │ │ │ ├── people_builds.png │ │ │ ├── people_groups.png │ │ │ ├── people_overview.png │ │ │ ├── people_packages.png │ │ │ ├── people_updates.png │ │ │ ├── search_results.png │ │ │ ├── search_topbox.png │ │ │ ├── packages_updates.png │ │ │ ├── people_directory.png │ │ │ ├── packages_changelog.png │ │ │ ├── packages_downloads.png │ │ │ ├── packages_activereleases.png │ │ │ ├── packages_bugs-dashboard.png │ │ │ ├── packages_package-owners.png │ │ │ └── packages_packages-i-own.png │ │ │ └── illustration_package-details.png │ └── css │ │ ├── filetreetheme │ │ ├── d.gif │ │ ├── d.png │ │ └── throbber.gif │ │ ├── fonts │ │ ├── Cantarell-Bold-webfont.eot │ │ ├── Cantarell-Bold-webfont.ttf │ │ ├── Cantarell-Bold-webfont.woff │ │ ├── Comfortaa_Bold-webfont.eot │ │ ├── Comfortaa_Bold-webfont.ttf │ │ ├── Comfortaa_Bold-webfont.woff │ │ ├── Comfortaa_Thin-webfont.eot │ │ ├── Comfortaa_Thin-webfont.ttf │ │ ├── Comfortaa_Thin-webfont.woff │ │ ├── Cantarell-Oblique-webfont.eot │ │ ├── Cantarell-Oblique-webfont.ttf │ │ ├── Cantarell-Oblique-webfont.woff │ │ ├── Cantarell-Regular-webfont.eot │ │ ├── Cantarell-Regular-webfont.ttf │ │ ├── Cantarell-Regular-webfont.woff │ │ ├── Comfortaa_Regular-webfont.eot │ │ ├── Comfortaa_Regular-webfont.ttf │ │ ├── Comfortaa_Regular-webfont.woff │ │ ├── Cantarell-BoldOblique-webfont.eot │ │ ├── Cantarell-BoldOblique-webfont.ttf │ │ └── Cantarell-BoldOblique-webfont.woff │ │ ├── ellipsis.xml │ │ ├── typeaheadjs.css │ │ ├── reset.css │ │ ├── planet-fedora-bubbles.css │ │ ├── myfedora-branding.css │ │ └── text.css ├── websetup.py └── pool.py ├── fedmsg.d └── fedoracommunity.py ├── devel ├── ansible │ ├── playbook.yml │ └── roles │ │ └── dev │ │ └── tasks │ │ └── main.yml ├── docker │ ├── entry-point.sh │ ├── packages │ └── fedora-packages.conf ├── docker-compose.yml └── 01packages.txt ├── logrotate ├── AUTHORS ├── tests ├── config.py ├── conftest.py └── cassettes │ └── test_Indexer_latest_active.yaml ├── fedora-packages.wsgi ├── MANIFEST.in ├── test.ini ├── Vagrantfile ├── .gitignore ├── setup.cfg ├── validate_templates.py ├── bootstrap.py └── README.md /docs/.build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/lib/base.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/search/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/plugins/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/search/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/git.mak: -------------------------------------------------------------------------------- 1 | TODO 2 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/diffs.mak: -------------------------------------------------------------------------------- 1 | TODO 2 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/__init__.py: -------------------------------------------------------------------------------- 1 | from package import * 2 | -------------------------------------------------------------------------------- /fedoracommunity/__init__.py: -------------------------------------------------------------------------------- 1 | __import__('pkg_resources').declare_namespace(__name__) 2 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/search/__init__.py: -------------------------------------------------------------------------------- 1 | from search_grid import XapianSearchGrid 2 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/__init__.py: -------------------------------------------------------------------------------- 1 | from widgets import * 2 | from package.updates import * 3 | -------------------------------------------------------------------------------- /fedmsg.d/fedoracommunity.py: -------------------------------------------------------------------------------- 1 | config = { 2 | 'fedoracommunity.fedmsg.consumer.enabled': True, 3 | } 4 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/widgets/__init__.py: -------------------------------------------------------------------------------- 1 | from widgets import fcomm_js 2 | 3 | __all__ = [fcomm_js] 4 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/templates/widget_loader.mak: -------------------------------------------------------------------------------- 1 | 2 | ${widget.display(args=args, kwds=kwds) | n} 3 | 4 | -------------------------------------------------------------------------------- /devel/ansible/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | become: true 4 | become_method: sudo 5 | vars: 6 | roles: 7 | - dev 8 | -------------------------------------------------------------------------------- /fedoracommunity/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/favicon.ico -------------------------------------------------------------------------------- /fedoracommunity/public/images/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/ok.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/info.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/line.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16-fas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16-fas.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_abrt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_abrt.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_bugs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_bugs.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_chat.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_koji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_koji.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_mail.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/bugfix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/bugfix.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/favicon.ico -------------------------------------------------------------------------------- /fedoracommunity/public/images/geiger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/geiger.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/laser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/laser.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/spinner.gif -------------------------------------------------------------------------------- /fedoracommunity/public/images/testing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/testing.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tg2_04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tg2_04.gif -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_active.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_bodhi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_bodhi.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_clock.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_fedora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_fedora.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_globe.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_phone.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_pkgdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_pkgdb.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_tagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_tagger.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/arrow_up.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/nav_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/nav_arrow.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/panda-wee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/panda-wee.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/repeater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/repeater.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/security.png -------------------------------------------------------------------------------- /fedoracommunity/public/css/filetreetheme/d.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/filetreetheme/d.gif -------------------------------------------------------------------------------- /fedoracommunity/public/css/filetreetheme/d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/filetreetheme/d.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_bugzilla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_bugzilla.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_failured.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_failured.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_inactive.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_karma-bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_karma-bad.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_karma-meh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_karma-meh.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_package.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_sources.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_success.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_transifex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_transifex.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/arrow_down.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/border-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/border-left.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/border-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/border-right.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/c8c8c8_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/c8c8c8_dot.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/enhancement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/enhancement.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/header-tab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/header-tab1.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/header-tab2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/header-tab2.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/header_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/header_inner.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/spinner-20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/spinner-20.gif -------------------------------------------------------------------------------- /fedoracommunity/public/images/spinner-old.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/spinner-old.gif -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_karma-good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_karma-good.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/grad_blue_7x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/grad_blue_7x80.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_announcement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_announcement.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_build_state_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_build_state_0.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_build_state_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_build_state_1.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_build_state_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_build_state_2.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_build_state_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_build_state_3.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_build_state_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_build_state_4.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_failure_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_failure_build.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_offsite-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_offsite-link.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_package_bugfix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_package_bugfix.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_status-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_status-success.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_success_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_success_build.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/banners/paintain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/banners/paintain.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/grad_grey_1x116.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/grad_grey_1x116.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/grad_grey_1x225.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/grad_grey_1x225.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/list_tree_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/list_tree_marker.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/package_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/package_128x128.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tg_under_the_hood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tg_under_the_hood.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/vertical-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/vertical-gradient.png -------------------------------------------------------------------------------- /logrotate: -------------------------------------------------------------------------------- 1 | /var/log/fedoracommunity/*.log { 2 | weekly 3 | missingok 4 | compress 5 | delaycompress 6 | copytruncate 7 | minsize 100k 8 | } 9 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/filetreetheme/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/filetreetheme/throbber.gif -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_in_progress_anim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_in_progress_anim.gif -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_package_security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_package_security.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_status-attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_status-attention.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/grad_orange_11x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/grad_orange_11x100.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/planet-bubbles/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/planet-bubbles/top.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/planet-bubbles/vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/planet-bubbles/vert.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/under_the_hood_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/under_the_hood_blue.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_package_enhancement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_package_enhancement.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_package_newpackage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_package_newpackage.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/action-box_add-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/action-box_add-button.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/fedora-community-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/fedora-community-logo.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/fedora_intro_banner1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/fedora_intro_banner1.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/fedora_packages_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/fedora_packages_logo.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/planet-bubbles/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/planet-bubbles/bottom.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/planet-bubbles/corners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/planet-bubbles/corners.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/planet-bubbles/horiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/planet-bubbles/horiz.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/planet-bubbles/point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/planet-bubbles/point.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/text_entry_drop_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/text_entry_drop_shadow.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_build_state_${state}.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_build_state_${state}.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/16_karma-${karma_level}.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/16_karma-${karma_level}.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/Powered-by-moksha_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/Powered-by-moksha_button.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/banners/banner-tour-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/banners/banner-tour-menu.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/count-box-gradient_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/count-box-gradient_dark.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/count-box-gradient_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/count-box-gradient_light.png -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Bold-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Bold-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Bold-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Bold-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Bold-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Bold-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Thin-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Thin-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Thin-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Thin-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Thin-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Thin-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/images/fedora-packges_logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/fedora-packges_logo-white.png -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Oblique-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Oblique-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Oblique-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Oblique-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Oblique-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Oblique-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Regular-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Regular-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-Regular-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Regular-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Regular-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Comfortaa_Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Comfortaa_Regular-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-BoldOblique-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-BoldOblique-webfont.eot -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-BoldOblique-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-BoldOblique-webfont.ttf -------------------------------------------------------------------------------- /fedoracommunity/public/images/banners/main-banner_tour-promo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/banners/main-banner_tour-promo.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/illustration_people-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/illustration_people-details.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/illustration_search-fedora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/illustration_search-fedora.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_builds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_builds.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/people_builds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/people_builds.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/people_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/people_groups.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/people_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/people_overview.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/people_packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/people_packages.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/people_updates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/people_updates.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/search_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/search_results.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/search_topbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/search_topbox.png -------------------------------------------------------------------------------- /fedoracommunity/public/css/fonts/Cantarell-BoldOblique-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/css/fonts/Cantarell-BoldOblique-webfont.woff -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/illustration_package-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/illustration_package-details.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_updates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_updates.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/people_directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/people_directory.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_changelog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_changelog.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_downloads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_downloads.png -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/bugs.mak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | % for child in w.children: 5 | ${child.display(package=w.main_package)} 6 | % endfor 7 | 8 | 9 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/builds.mak: -------------------------------------------------------------------------------- 1 |
2 |
3 |
${w.children[0].display(package_name=w.main_package)}
4 |
5 |
6 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/changelog.mak: -------------------------------------------------------------------------------- 1 |
2 |
3 |
${w.children[0].display(package_name=w.kwds['package_name'])}
4 |
5 |
6 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/problems.mak: -------------------------------------------------------------------------------- 1 |
2 |
3 |
${w.children[0].display(package_name=w.kwds['package_name'])}
4 |
5 |
6 | -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_activereleases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_activereleases.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_bugs-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_bugs-dashboard.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_package-owners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_package-owners.png -------------------------------------------------------------------------------- /fedoracommunity/public/images/tour/screenshots/packages_packages-i-own.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fedora-packages/master/fedoracommunity/public/images/tour/screenshots/packages_packages-i-own.png -------------------------------------------------------------------------------- /devel/docker/entry-point.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd /usr/share/fedoracommunity/ 4 | python setup.py install 5 | popd 6 | export GIT_PYTHON_REFRESH=quiet 7 | echo "http://0.0.0.0/packages" 8 | dumb-init httpd -DFOREGROUND 9 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/overview.mak: -------------------------------------------------------------------------------- 1 | 2 |
3 | ${w.children[0].display(args=w.args, kwds=w.kwds) | n} 4 |
5 | 6 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/updates.mak: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Updates

4 |
${w.children[0].display(package_name=w.kwds['package_name'])}
5 |
6 |
7 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/widgets/widgets.py: -------------------------------------------------------------------------------- 1 | 2 | import tw2.core as twc 3 | from moksha.wsgi.widgets.moksha_js import moksha_js 4 | 5 | fcomm_js = twc.JSLink( 6 | modname=__name__, 7 | filename="static/js/fcomm.js", 8 | resources=[moksha_js], 9 | ) 10 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | John (J5) Palmieri 2 | Luke Macken 3 | Mairin Duffy 4 | Douglas E. Warner 5 | Ian Weller 6 | Seth Vidal 7 | Ralph Bean 8 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/search/search_grid.py: -------------------------------------------------------------------------------- 1 | from fedoracommunity.widgets.grid import Grid 2 | 3 | class XapianSearchGrid(Grid): 4 | template="mako:fedoracommunity.widgets.search.templates.search_results" 5 | resource = 'xapian' 6 | resource_path = 'search_packages' 7 | morePager = True 8 | onReady = "ready_search()" 9 | -------------------------------------------------------------------------------- /devel/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | web: 4 | build: 5 | context: . 6 | dockerfile: ./docker/packages 7 | image: packages:latest 8 | ports: 9 | - "80:80" 10 | volumes: 11 | - $PWD/..:/usr/share/fedoracommunity:z 12 | - $PWD/../fedoracommunity:/usr/lib/python2.7/site-packages/fedoracommunity:z 13 | command: ["/root/entry-point.sh"] 14 | -------------------------------------------------------------------------------- /tests/config.py: -------------------------------------------------------------------------------- 1 | # 2 | # Fedora Packages - unit test configuration 3 | # 4 | [DEFAULT] 5 | fedoracommunity.connector.xapian.package-search.db = /tmp/xapian/search 6 | 7 | cache.connectors.backend=dogpile.cache.memcached 8 | cache.connectors.expiration_time=30 9 | cache.connectors.arguments.url=127.0.0.1:11211 10 | cache.connectors.arguments.distributed_lock=False 11 | 12 | [app:main] 13 | use = egg:fedoracommunity 14 | -------------------------------------------------------------------------------- /fedora-packages.wsgi: -------------------------------------------------------------------------------- 1 | import os 2 | os.environ['PYTHON_EGG_CACHE'] = '/var/cache/fedoracommunity/.egg_cache' 3 | import __main__ 4 | __main__.__requires__ = 'fedoracommunity' 5 | import pkg_resources 6 | 7 | APP_CONFIG = '/etc/fedoracommunity/production.ini' 8 | 9 | import logging.config 10 | logging.config.fileConfig(APP_CONFIG) 11 | 12 | from paste.deploy import loadapp 13 | application = loadapp('config:%s' % APP_CONFIG) 14 | 15 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/ellipsis.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/release_filter.mak: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 10 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/diffstat.mak: -------------------------------------------------------------------------------- 1 | <%def name="render_diffstat(diffstat)"> 2 | 3 | 4 | <% diffstat_split = diffstat.strip().split('\n') %> 5 | % for line in diffstat_split[:-1]: 6 | <% split = line.split('|') %> 7 | 8 | % endfor 9 | 10 |
FileChanges
${split[0]}${split[1]}
${diffstat_split[-1]}
11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import os 3 | import shutil 4 | import xapian 5 | 6 | 7 | @pytest.fixture(scope='module') 8 | def delete_xapian_db(): 9 | if os.path.isdir('/tmp/xapian/search'): 10 | shutil.rmtree('/tmp/xapian/search') 11 | 12 | 13 | @pytest.fixture(scope='module') 14 | def create_xapian_db(): 15 | """ Fixture that creates an empty xapian db """ 16 | 17 | db = xapian.WritableDatabase('/tmp/xapian/search', xapian.DB_CREATE_OR_OPEN) 18 | db.close() 19 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include fedoracommunity *.mak 2 | recursive-include fedoracommunity *.js 3 | recursive-include fedoracommunity *.png *.gif *.svg 4 | recursive-include fedoracommunity/public/css *.css *.ttf *.png *.gif *.svg *.eot *.woff 5 | recursive-include initsys * 6 | include logrotate 7 | 8 | include fedora-packages.* 9 | include orbited.cfg 10 | include README.txt 11 | include AUTHORS 12 | include COPYING 13 | include bin/fcomm-index-packages 14 | include bin/fcomm-index-latest-builds 15 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/__init__.py: -------------------------------------------------------------------------------- 1 | from kojiconnector import KojiConnector 2 | from fafconnector import FafConnector 3 | from bodhiconnector import BodhiConnector 4 | from yumconnector import YumConnector 5 | from bugzillaconnector import BugzillaConnector 6 | from jsonconnector import SimpleJsonConnector 7 | from xapianconnector import XapianConnector 8 | 9 | __all__ = [KojiConnector, FafConnector, BodhiConnector, YumConnector, 10 | BugzillaConnector, SimpleJsonConnector, XapianConnector] 11 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/package_spec.mak: -------------------------------------------------------------------------------- 1 | 9 | 10 | ${w.children[0].display(on_change='on_change', package=w.package_name) | n} 11 | 12 |
13 | 14 |
15 |
16 | ${w.text | n} 17 |
18 |
19 | -------------------------------------------------------------------------------- /test.ini: -------------------------------------------------------------------------------- 1 | # 2 | # myfedora - Pylons testing environment configuration 3 | # 4 | # The %(here)s variable will be replaced with the parent directory of this file 5 | # 6 | [DEFAULT] 7 | debug = true 8 | # Uncomment and replace with the address which should receive any error reports 9 | # email_to = you@yourdomain.com 10 | smtp_server = localhost 11 | error_email_from = paste@localhost 12 | 13 | [server:main] 14 | use = egg:Paste#http 15 | host = 0.0.0.0 16 | port = 5000 17 | 18 | [app:main] 19 | use = config:development.ini 20 | 21 | # Add additional test specific configuration options as necessary. 22 | -------------------------------------------------------------------------------- /devel/01packages.txt: -------------------------------------------------------------------------------- 1 | # F27 package dependencies for `fedora-packages` 2 | 3 | TurboGears2 4 | python-moksha-wsgi 5 | intltool 6 | koji 7 | bodhi-client 8 | python-feedparser 9 | python-iniparse 10 | pytz 11 | python2-pyOpenSSL 12 | httpd 13 | mod_wsgi 14 | diffstat 15 | fedpkg 16 | python-lockfile 17 | python-tw2-jqplugins-ui 18 | python-bugzilla 19 | xapian-bindings-python 20 | python-dogpile-core 21 | python-dogpile-cache 22 | python-memcached 23 | python2-markdown 24 | pygobject3 25 | fedmsg 26 | python2-pytest 27 | python2-pdc-client 28 | python2-webhelpers 29 | libappstream-glib 30 | dumb-init 31 | python2-GitPython 32 | git 33 | python2-pytest-mock 34 | python2-pytest-vcr 35 | 36 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure(2) do |config| 5 | config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/28/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-28-1.1.x86_64.vagrant-libvirt.box" 6 | config.vm.box = "f28-cloud-libvirt" 7 | config.vm.network "forwarded_port", guest: 8080, host: 8080 8 | config.vm.synced_folder ".", "/vagrant", type: "sshfs" 9 | # Ansible needs the guest to have these 10 | config.vm.provision "shell", inline: "sudo dnf install -y libselinux-python python2-dnf" 11 | 12 | config.vm.provision "ansible" do |ansible| 13 | ansible.playbook = "devel/ansible/playbook.yml" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/problems.py: -------------------------------------------------------------------------------- 1 | import tw2.core as twc 2 | from fedoracommunity.widgets.grid import Grid 3 | 4 | class ProblemsGrid(Grid): 5 | template='mako:fedoracommunity.widgets.package.templates.problems_table_widget' 6 | resource='faf' 7 | resource_path='query_problems' 8 | 9 | def prepare(self): 10 | self.filters = { 11 | 'package_name' : self.package_name 12 | } 13 | 14 | self.rows_per_page = 10 15 | 16 | # Must do this last for our Grids 17 | super(ProblemsGrid, self).prepare() 18 | 19 | 20 | class ProblemsWidget(twc.Widget): 21 | template = 'mako:fedoracommunity.widgets.package.templates.problems' 22 | problems_grid = ProblemsGrid 23 | -------------------------------------------------------------------------------- /fedoracommunity/search/utils.py: -------------------------------------------------------------------------------- 1 | import urllib 2 | 3 | words_translation = {'d-bus': 'dbus', 4 | 'gtk+': 'gtk'} 5 | 6 | reserved_chars = ['+', '-', '\'', '"'] 7 | 8 | 9 | def filter_search_string (string): 10 | """Replaces xapian reserved characters with underscore, lowercases 11 | the string and replaces spelling of certain words/names with more 12 | common versions 13 | 14 | Reserved Characters: 15 | +, -, ', " 16 | """ 17 | 18 | string = string.lower() 19 | for key, value in words_translation.items(): 20 | string = string.replace(key, value) 21 | 22 | for char in reserved_chars: 23 | string = string.replace(char, '_') 24 | 25 | return string 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | tg2/* 3 | dist/* 4 | data/* 5 | build/* 6 | *.egg-info 7 | myfedora/* 8 | *.swp 9 | *.swo 10 | *.db 11 | xapian/* 12 | uitests/* 13 | profile/* 14 | *~ 15 | *.rpm 16 | *.bz2 17 | *.xz 18 | *.orig 19 | log 20 | fedoracommunity/search/cache/usr 21 | fedoracommunity/search/yum-cache 22 | fedoracommunity/search/xapian 23 | fedoracommunity/search/var 24 | fedoracommunity/search/tmp 25 | fedoracommunity/search/icons 26 | fedoracommunity/public/images/icons 27 | fedoracommunity/search/cache 28 | xappy 29 | logs 30 | git.fedoraproject.org 31 | icons 32 | fedoracommunity/templates/home/ 33 | var 34 | *.dbm* 35 | versionmap 36 | xapian-backup* 37 | .vagrant 38 | devel/ansible/playbook.retry 39 | *.tar.gz 40 | .cache 41 | .venv/ 42 | .vscode/ 43 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/patch.mak: -------------------------------------------------------------------------------- 1 | <%namespace file="diffstat.mak" import="render_diffstat"/> 2 | 3 | % if w.changelog: 4 | 5 | % for change in w.changelog: 6 | 7 | 10 | 13 | 16 | % endfor 17 |
8 | • ${change['msg'].split('\n')[0]} 9 | 11 | ${change['author']} 12 | 14 | ${change['date'].strftime('%d %b %Y')} 15 |
18 | % endif 19 | 20 | % if w.diffstat: 21 | ${render_diffstat(w.diffstat)} 22 | % endif 23 |
24 | Link to raw patch 25 |
26 |
27 | ${w.text} 28 | 29 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/active_releases.mak: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 |
ReleaseLatest Released VersionVersion in Testing
13 |
{{html release}} 
14 |
{{html stable_version}}{{html testing_version}}
20 |
21 | -------------------------------------------------------------------------------- /docs/main/Connectors.rst: -------------------------------------------------------------------------------- 1 | Moksha Data Connector Interfaces 2 | ================================ 3 | 4 | .. automodule:: fedoracommunity.connector.api.connector 5 | 6 | from moksha.connector import :class:`IConnector`, :class:`ICall`, :class:`IQuery`, :class:`ISearch` 7 | --------------------------------------------------------------------------------------------------- 8 | 9 | .. autoclass:: fedoracommunity.connector.api.connector.IConnector 10 | :members: 11 | :inherited-members: 12 | 13 | .. autoclass:: fedoracommunity.connector.api.connector.ICall 14 | :members: 15 | :inherited-members: 16 | 17 | .. autoclass:: fedoracommunity.connector.api.connector.IQuery 18 | :members: 19 | :inherited-members: 20 | 21 | .. autoclass:: fedoracommunity.connector.api.connector.ISearch 22 | :members: 23 | :inherited-members: 24 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/tarballs.mak: -------------------------------------------------------------------------------- 1 | 9 | 10 | ${w.children[0].display(on_change='on_change', package=w.package)} 11 | 12 |
13 |
14 | % if w.upstream_tarball: 15 |

Upstream Tarball

16 | ${w.upstream_tarball} 17 | % else: 18 | No upstream tarball found 19 | % endif 20 |
21 |
22 | % if w.fedora_tarball: 23 |

Fedora Look-aside Tarball

24 | ${w.fedora_tarball} 25 | % else: 26 | No Fedora tarball found 27 | % endif 28 |
29 |
30 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/contents.py: -------------------------------------------------------------------------------- 1 | import tw2.core as twc 2 | 3 | from fedoracommunity.widgets.tree import tree_js 4 | 5 | class FilelistTree(twc.Widget): 6 | template='mako:fedoracommunity.widgets.package.templates.filelist_tree_widget' 7 | 8 | def prepare(self): 9 | super(FilelistTree, self).prepare() 10 | 11 | 12 | class ContentsWidget(twc.Widget): 13 | resources = [tree_js] 14 | template = 'mako:fedoracommunity.widgets.package.templates.contents' 15 | # filelist_tree = FilelistTree 16 | 17 | def prepare(self): 18 | super(ContentsWidget, self).prepare() 19 | 20 | self.package_name = self.kwds['package_name'] 21 | self.subpackage_of = self.kwds.get('subpackage_of', '') 22 | 23 | # TODO - get these from from the 'active releases' connector. 24 | self.repos = ['rawhide'] 25 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [egg_info] 2 | tag_build = 3 | #tag_svn_revision = true 4 | 5 | [easy_install] 6 | find_links = http://www.pylonshq.com/download/ 7 | 8 | [nosetests] 9 | with-pylons=test.ini 10 | 11 | # Babel configuration 12 | [compile_catalog] 13 | domain = myfedora 14 | directory = myfedora/i18n 15 | statistics = true 16 | 17 | [extract_messages] 18 | add_comments = TRANSLATORS: 19 | output_file = myfedora/i18n/myfedora.pot 20 | width = 80 21 | 22 | [init_catalog] 23 | domain = myfedora 24 | input_file = myfedora/i18n/myfedora.pot 25 | output_dir = myfedora/i18n 26 | 27 | [update_catalog] 28 | domain = myfedora 29 | input_file = myfedora/i18n/myfedora.pot 30 | output_dir = myfedora/i18n 31 | previous = true 32 | 33 | [archive_tw_resources] 34 | output = toscawidgets 35 | distributions = fedoracommunity 36 | #compresslevel = 2 37 | onepass = true 38 | #yuicompressor = /home/someuser/bin/yuicompressor.jar 39 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/jquery_template.py: -------------------------------------------------------------------------------- 1 | # This file is part of Moksha. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import tw2.core as twc 17 | import tw2.jquery 18 | 19 | jquery_template_js = twc.JSLink( 20 | modname=__name__, 21 | filename='static/javascript/jquery.tmpl.js', 22 | resources=[tw2.jquery.jquery_js]) 23 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/changelog.py: -------------------------------------------------------------------------------- 1 | import tw2.core as twc 2 | from fedoracommunity.widgets.grid import Grid 3 | 4 | class ChangelogGrid(Grid): 5 | template='mako:fedoracommunity.widgets.package.templates.changelog_table_widget' 6 | resource='koji' 7 | resource_path='query_changelogs' 8 | 9 | def prepare(self): 10 | 11 | # TODO - get these from from the 'active releases' connector. 12 | self.all_releases = [ 13 | 'rawhide', 14 | ] 15 | 16 | self.filters = { 17 | 'package_name': self.package_name, 18 | 'release': self.all_releases[0], 19 | } 20 | self.rows_per_page = 10 21 | 22 | # Must do this last for our Grids 23 | super(ChangelogGrid, self).prepare() 24 | 25 | 26 | class ChangelogWidget(twc.Widget): 27 | template = 'mako:fedoracommunity.widgets.package.templates.changelog' 28 | changelog_grid = ChangelogGrid 29 | -------------------------------------------------------------------------------- /fedoracommunity/config/environment.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | from fedoracommunity.config.app_cfg import base_config 18 | 19 | load_environment = base_config.make_load_environment() 20 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/builds.py: -------------------------------------------------------------------------------- 1 | import tw2.core as twc 2 | from fedoracommunity.widgets.grid import Grid 3 | 4 | class BuildsGrid(Grid): 5 | template='mako:fedoracommunity.widgets.package.templates.builds_table_widget' 6 | resource='koji' 7 | resource_path='query_builds' 8 | 9 | def prepare(self): 10 | self.filters = {'package': self.package_name} 11 | self.rows_per_page = 10 12 | 13 | # Must do this last for our Grids 14 | super(BuildsGrid, self).prepare() 15 | 16 | 17 | class Builds(twc.Widget): 18 | template = 'mako:fedoracommunity.widgets.package.templates.builds' 19 | in_progress_builds = BuildsGrid 20 | 21 | def prepare(self): 22 | super(Builds, self).prepare() 23 | subpackage_of = self.kwds.get('subpackage_of', '') 24 | 25 | if subpackage_of: 26 | self.main_package = subpackage_of 27 | else: 28 | self.main_package = self.kwds['package_name'] 29 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/api/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Moksha. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | from connector import IConnector, ICall, IQuery, IFeed, INotify, ISearch 17 | from utils import ParamFilter 18 | 19 | from mw import _get_connector as get_connector 20 | 21 | __all__ = [IConnector, ICall, IQuery, IFeed, INotify, ISearch, ParamFilter, 22 | get_connector] 23 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/provides_table_widget.mak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | ${'${total_rows}'} total provides 8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 |
Provides
20 | ${'${name}'} ${'${ops}'} ${'${version}'} 21 |
25 |
26 |
27 |
28 |
29 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/conflicts_table_widget.mak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | ${'${total_rows}'} total conflicts 8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 |
Conflicts
20 | ${'${name}'} ${'${ops}'} ${'${version}'} 21 |
25 |
26 |
27 |
28 |
29 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/obsoletes_table_widget.mak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 | ${'${total_rows}'} total obsoletes 8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 |
Obsoletes
20 | ${'${name}'} ${'${ops}'} ${'${version}'} 21 |
25 |
26 |
27 |
28 |
29 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /fedoracommunity/search/distmappings.py: -------------------------------------------------------------------------------- 1 | # Global list of koji tags we care about 2 | tags = ({'name': 'Rawhide', 'tag': 'f21'}, 3 | 4 | {'name': 'Fedora 20', 'tag': 'f20-updates'}, 5 | {'name': 'Fedora 20', 'tag': 'f20'}, 6 | {'name': 'Fedora 20 Testing', 'tag': 'f20-updates-testing'}, 7 | 8 | {'name': 'Fedora 19', 'tag': 'f19-updates'}, 9 | {'name': 'Fedora 19', 'tag': 'f19'}, 10 | {'name': 'Fedora 19 Testing', 'tag': 'f19-updates-testing'}, 11 | 12 | {'name': 'Fedora 18', 'tag': 'f18-updates'}, 13 | {'name': 'Fedora 18', 'tag': 'f18'}, 14 | {'name': 'Fedora 18 Testing', 'tag': 'f18-updates-testing'}, 15 | 16 | {'name': 'EPEL 6', 'tag': 'dist-6E-epel'}, 17 | {'name': 'EPEL 6 Testing', 'tag': 'dist-6E-epel-testing'}, 18 | 19 | {'name': 'EPEL 5', 'tag': 'dist-5E-epel'}, 20 | {'name': 'EPEL 5 Testing', 'tag': 'dist-5E-epel-testing'}, 21 | 22 | {'name': 'EPEL 7', 'tag': 'epel7'}, 23 | {'name': 'EPEL 7 Testing', 'tag': 'epel7-testing'}, 24 | ) 25 | 26 | tags_to_name_map = {} 27 | for t in tags: 28 | tags_to_name_map[t['tag']] = t['name'] 29 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/expander.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | """ 18 | :mod:`fedoracommunity.widgets.expander` -- An Expander Widget 19 | ============================================================= 20 | 21 | http://plugins.learningjquery.com/expander 22 | """ 23 | 24 | import tw2.core as twc 25 | 26 | expander_js = twc.JSLink(filename='static/javascript/jquery.expander.js', 27 | modname=__name__) 28 | -------------------------------------------------------------------------------- /fedoracommunity/lib/app_globals.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | """The application's Globals object""" 18 | 19 | from tg import config 20 | 21 | class Globals(object): 22 | """Globals acts as a container for objects available throughout the 23 | life of the application 24 | """ 25 | 26 | def __init__(self): 27 | """One instance of Globals is created during application 28 | initialization and is available during requests via the 'g' 29 | variable 30 | """ 31 | pass 32 | -------------------------------------------------------------------------------- /fedoracommunity/plugins/extensions/make_menu.js: -------------------------------------------------------------------------------- 1 | // This file is part of Fedora Community. 2 | // Copyright (C) 2008-2009 Red Hat, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as 6 | // published by the Free Software Foundation, either version 3 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | { 18 | info: { 19 | consumes:['make_menu'], 20 | author: 'John (J5) Palmieri ', 21 | version: '0.1', 22 | name: 'Menu Creator', 23 | summary: 'Async creation of menus used inside of templates', 24 | description: 'Since jQuery templates can\'t have javascript in \ 25 | them we use this to create a javascript menu' 26 | }, 27 | 28 | run: function (data) { 29 | $('#' + data.placeholder_id).moksha_popup(); 30 | 31 | return null; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /devel/docker/packages: -------------------------------------------------------------------------------- 1 | # This image can only be built when it is executed with context 2 | # set to root directory or project checkout. 3 | # 4 | # docker build -f packages ../ 5 | # 6 | # `docker-compose build` from parent dir does this automatically. 7 | 8 | FROM registry.fedoraproject.org/fedora:27 9 | 10 | COPY 01packages.txt /root/01packages.txt 11 | RUN dnf install -y $(grep "^[^#]" /root/01packages.txt) 12 | RUN dnf clean all 13 | 14 | RUN mkdir -p /var/log/fedoracommunity\ 15 | /var/cache/fedoracommunity/packages/icons\ 16 | /var/cache/fedoracommunity/packages/xapian/search\ 17 | /var/cache/fedoracommunity/packages/tmp/icons\ 18 | /var/cache/fedoracommunity/packages/tmp/search\ 19 | /var/cache/fedoracommunity/packages/tmp/var\ 20 | /var/tmp/fedoracommunity/icons/tmp\ 21 | /usr/share/fedoracommunity \ 22 | /tmp/xapian\ 23 | #forward error logs to docker log collector 24 | && ln -sf /dev/stdout /var/log/httpd/fedoracommunity_error_log 25 | 26 | EXPOSE 80 27 | 28 | # download and unpack production database 29 | WORKDIR /var/cache/fedoracommunity/packages 30 | RUN curl -O https://cverna.fedorapeople.org/xapian.tar.gz 31 | RUN tar -xvf xapian.tar.gz 32 | 33 | COPY docker/entry-point.sh /root/entry-point.sh 34 | COPY docker/fedora-packages.conf /etc/httpd/conf.d/fedora-packages.conf 35 | COPY docker/development.ini /etc/fedoracommunity/production.ini 36 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/required_by_table_widget.mak: -------------------------------------------------------------------------------- 1 | <% 2 | import tg 3 | %> 4 | 5 | 6 | 7 |
8 |
9 |
10 | ${'${total_rows}'} total requirements 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 30 | 31 | 32 | 33 |
Required ByDetails
24 | ${'${name}'} 25 | 28 | ${'${requires["name"]}'} ${'${requires["ops"]}'} ${'${requires["version"]}'} 29 |
34 |
35 |
36 |
37 |
38 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /fedoracommunity/templates/chrome.mak: -------------------------------------------------------------------------------- 1 | 2 | <%namespace file="fedoracommunity.templates.header" import="*" /> 3 | <%namespace file="fedoracommunity.templates.footer" import="*" /> 4 | 5 | 6 | 7 | 8 | ${title} 9 | 10 | 11 | 12 | 15 | 17 | 19 | 20 | 29 | 30 | 31 | 32 |
33 | ${header()} 34 | 35 |
36 | ${tmpl_context.widget.display(**options) | n} 37 |
38 |
39 | ${footer(options['kwds']['package_name'])} 40 | 41 | 42 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/problems_table_widget.mak: -------------------------------------------------------------------------------- 1 | <% import tg %> 2 | 3 | 4 | 5 |
6 | Listing problems occurred in the last two weeks. For more information see ABRT Analytics server. 7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
IDStatusCrash functionCount
${'${id}'}${'${status}'}${'${crash_function}'}${'${count}'}
25 |
26 |
27 | This package has no Problem entries 28 |
29 |
30 |
31 |
32 | Viewing all Problem entries 33 |
34 |
35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/tree.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the F# This file is part of Fedora Community. 7 | # Copyright (C) 2008-2010 Red Hat, Inc. 8 | # 9 | # This program is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU Affero General Public License as 11 | # published by the Free Software Foundation, either version 3 of the 12 | # License, or (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU Affero General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Affero General Public License 20 | # along with this program. If not, see . 21 | 22 | """ 23 | :mod:`fedoracommunity.widgets.tree` -- wrapper for jquery jstree plugin 24 | ============================================================= 25 | """ 26 | 27 | 28 | import tw2.core as twc 29 | import tw2.jqplugins.ui 30 | 31 | tree_js = twc.JSLink(filename='static/javascript/jquery.jstree.js', 32 | resources=[tw2.jqplugins.ui.jquery_ui_js], 33 | modname=__name__) 34 | -------------------------------------------------------------------------------- /fedoracommunity/templates/index.mak: -------------------------------------------------------------------------------- 1 | <%namespace file="fedoracommunity.templates.header" import="*" /> 2 | <%namespace file="fedoracommunity.templates.footer" import="*" /> 3 | <% from tg import flash %> 4 | 5 | 6 | 7 | ${title} 8 | 9 | 10 | 11 | 14 | 16 | 18 | 19 | 28 | 29 | 30 | 31 |
32 | 35 |
36 | % if flash.message: 37 | ${flash.message} 38 | % endif 39 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/widgets/static/js/fcomm.js: -------------------------------------------------------------------------------- 1 | 2 | fcomm = { 3 | connector_load: function(resource, method, params, callback, $overlay_div, loading_icon) { 4 | var path = moksha.url('/fcomm_connector/' + resource + '/' + method); 5 | // TODO -- this used to be settable in the configuration 6 | // (development.ini). I disabled it since it spanned the 7 | // moksha/fcomm divide in the Great Migration of February 9, 8 | // 2012. 9 | var moksha_profile_connectors = false; 10 | if (moksha_profile_connectors == true) { 11 | var start_time = new Date().getTime(); 12 | var profile_callback = function(data) { 13 | var profile_id = data['moksha_profile_id']; 14 | var callback_start_time = new Date().getTime(); 15 | callback(data); 16 | var end_time = new Date().getTime(); 17 | 18 | profile_info = { 19 | 'id' : profile_id, 20 | 'start_time' : start_time, 21 | 'callback_start_time': callback_start_time, 22 | 'end_time' : end_time 23 | }; 24 | 25 | // fire and forget the profile collector 26 | moksha.json_load(moksha.url('/fcomm_connector/prof_collector'), profile_info, function(data){}, null, null); 27 | } 28 | return moksha.json_load(path, params, profile_callback, $overlay_div, loading_icon); 29 | } else { 30 | return moksha.json_load(path, params, callback, $overlay_div, loading_icon); 31 | } 32 | }, 33 | } 34 | -------------------------------------------------------------------------------- /devel/ansible/roles/dev/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install dev packages 3 | dnf: 4 | name: "{{ item }}" 5 | state: present 6 | with_items: 7 | - python 8 | - python-devel 9 | - python-webhelpers 10 | - fedmsg 11 | - python-kitchen 12 | - python-bugzilla 13 | - koji 14 | - xapian-bindings-python 15 | - diffstat 16 | - fedpkg 17 | - python-webob 18 | - moksha 19 | - TurboGears2 20 | - python-dogpile-cache 21 | - python-dogpile-core 22 | - python-memcached 23 | - memcached 24 | - python-markdown 25 | - pygobject3 26 | - bodhi-client 27 | 28 | - name: Install python packages 29 | pip: 30 | name: "{{ item }}" 31 | state: present 32 | with_items: 33 | - gearbox 34 | 35 | - command: "{{ item }}" 36 | become: yes 37 | become_user: vagrant 38 | args: 39 | chdir: /vagrant/ 40 | with_items: 41 | - rm -rf /vagrant/xapian/ 42 | - curl -O https://cverna.fedorapeople.org/xapian.tar.gz 43 | - tar xvf xapian.tar.gz 44 | - rm -rf xapian.tar.gz 45 | 46 | - command: "{{ item }}" 47 | become: yes 48 | become_user: vagrant 49 | args: 50 | chdir: /var/tmp/ 51 | with_items: 52 | - rm -rf /vagrant/fedoracommunity/public/images/icons/ 53 | - curl -O https://lmacken.fedorapeople.org/fedora-packages/icons.tar.xz 54 | - tar xvf icons.tar.xz 55 | - mv icons /vagrant/fedoracommunity/public/images/ 56 | - rm -rf icons.tar.xz 57 | 58 | - command: "{{ item }}" 59 | args: 60 | chdir: /vagrant/ 61 | with_items: 62 | - python setup.py develop 63 | 64 | 65 | - service: 66 | name: memcached 67 | state: started 68 | enabled: yes 69 | -------------------------------------------------------------------------------- /fedoracommunity/websetup.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | """Setup the Fedora Community application""" 18 | import logging 19 | 20 | import transaction 21 | from paste.deploy import appconfig 22 | from pylons import config 23 | 24 | from fedoracommunity.config.environment import load_environment 25 | 26 | log = logging.getLogger(__name__) 27 | 28 | 29 | def setup_config(command, filename, section, vars): 30 | """Place any commands to setup Fedora Community here""" 31 | conf = appconfig('config:' + filename) 32 | load_environment(conf.global_conf, conf.local_conf) 33 | # Load the models 34 | from fedoracommunity import model 35 | print "Creating tables" 36 | model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine) 37 | 38 | #u.user_name = u'manager' 39 | #u.display_name = u'Exemple manager' 40 | #u.email_address = u'manager@somedomain.com' 41 | #u.password = u'managepass' 42 | 43 | #model.DBSession.save(u) 44 | 45 | #transaction.commit() 46 | print "Successfully setup" 47 | -------------------------------------------------------------------------------- /fedoracommunity/pool.py: -------------------------------------------------------------------------------- 1 | """ Our own threadpool implementation. 2 | 3 | - It is only slightly faster than the stdlib implementation. 4 | - It behaves like a generator. 5 | - It is used by the search indexer. 6 | 7 | """ 8 | 9 | import logging 10 | import threading 11 | import Queue as queue 12 | 13 | log = logging.getLogger(__name__) 14 | 15 | 16 | class Done(StopIteration): 17 | pass 18 | 19 | 20 | class Worker(object): 21 | def __init__(self, in_queue, out_queue, func): 22 | self.in_queue = in_queue 23 | self.out_queue = out_queue 24 | self.func = func 25 | 26 | def run(self): 27 | in_queue = self.in_queue 28 | out_queue = self.out_queue 29 | func = self.func 30 | try: 31 | while True: 32 | item = in_queue.get(False) 33 | result = func(item) 34 | out_queue.put(result) 35 | except queue.Empty: 36 | pass 37 | finally: 38 | out_queue.put(Done) 39 | 40 | 41 | class ThreadPool(object): 42 | def __init__(self, N): 43 | self.N = N 44 | 45 | def map(self, func, items): 46 | in_queue = queue.Queue() 47 | out_queue = queue.Queue() 48 | 49 | workers = [ 50 | threading.Thread(target=Worker(in_queue, out_queue, func).run) 51 | for i in range(self.N)] 52 | workers_working = self.N 53 | 54 | for item in items: 55 | in_queue.put(item) 56 | 57 | log.info('Starting workers.') 58 | [worker.start() for worker in workers] 59 | log.info("workers started") 60 | 61 | while workers_working != 0: 62 | result = out_queue.get(True) 63 | 64 | if result is Done: 65 | workers_working -= 1 66 | continue 67 | 68 | yield result 69 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/requires_table_widget.mak: -------------------------------------------------------------------------------- 1 | <% 2 | import tg 3 | %> 4 | 5 | 6 | 7 | 19 |
20 |
21 |
22 | ${'${total_rows}'} total requirements 23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 39 | 42 | 43 | 44 | 45 |
RequiresProvided By
36 | ${'${name}'} ${'${ops}'} ${'${version}'} 37 | 40 | {{html render_provided_by_list(provided_by)}} 41 |
46 |
47 |
48 |
49 |
50 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/search/templates/search_results.mak: -------------------------------------------------------------------------------- 1 | 2 | <% import tg %> 3 |
4 |
5 |
6 |
7 |
8 | ${'${total_rows}'} results 9 |
10 |
11 |
12 | 13 | 14 | 15 | 18 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 31 |
16 | ${'{{html name}}'} 17 | 19 | ${'{{html summary}}'} 20 |
25 | ${'{{html pkg["name"]}}'} 26 | ${'{{html pkg["summary"]}}'}
32 |
33 |
34 |
35 | 50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /fedoracommunity/templates/error.mak: -------------------------------------------------------------------------------- 1 | <% import tg %> 2 | 3 | Oops! 4 | 5 | 6 | 68 | 69 |

Oops, something went wrong!

70 |

Click the panda to go back.

71 | 72 |
73 | 74 |

${code}

75 |
76 | 77 | 78 | 79 |
80 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /fedoracommunity/templates/footer.mak: -------------------------------------------------------------------------------- 1 | 2 | <%def name="footer(package_name=None)"> 3 |
4 |
5 |

Found a bug on this website? File a ticket. For bugs in packages, click the "Open a New Bug" link on the packages Bugs page. Note: There's some caching going on here. If you expect something and don't see it, check back in 5 minutes.

6 | This Web Site is licensed under the GNU Affero General Public License. You may get sources for the current running code from these repositories: 7 | 13 |
14 |
15 | % if 'fedmenu.url' in config: 16 | 17 | 27 | % endif 28 | 40 | 41 | -------------------------------------------------------------------------------- /fedoracommunity/plugins/extensions/test.js: -------------------------------------------------------------------------------- 1 | // This file is part of Fedora Community. 2 | // Copyright (C) 2008-2009 Red Hat, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as 6 | // published by the Free Software Foundation, either version 3 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | { 18 | info: {consumes:['build_message'], 19 | author: 'John (J5) Palmieri ', 20 | version: '0.1', 21 | name: 'Hello World Message' 22 | }, 23 | 24 | run: function (data) { 25 | 26 | msg = this.HelloWorld(data.task_id); 27 | 28 | jQuery("#" + data.uid).css('background-color', 'blue'); 29 | return(msg); 30 | }, 31 | 32 | HelloWorld: function (name) { 33 | return("Hello " + name); 34 | } 35 | } 36 | 37 | { 38 | info: {consumes:['build_message'], 39 | author: 'John (J5) Palmieri ', 40 | version: '0.1', 41 | name: 'Goodbye World Message' 42 | }, 43 | 44 | run: function (data) { 45 | 46 | msg = this.GoodbyeWorld(data.task_id); 47 | 48 | jQuery("#" + data.uid).css('background-color', 'red'); 49 | return(msg); 50 | }, 51 | 52 | GoodbyeWorld: function (name) { 53 | return("Goodbye " + name); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/updates.py: -------------------------------------------------------------------------------- 1 | import tw2.core as twc 2 | 3 | from fedoracommunity.widgets.grid import Grid 4 | from fedoracommunity.connectors.api import get_connector 5 | 6 | from fedoracommunity.widgets.expander import expander_js 7 | 8 | bodhi_js = twc.JSLink(filename='static/javascript/bodhi.js', 9 | modname=__name__) 10 | 11 | class Updates(Grid): 12 | template = 'mako:fedoracommunity.widgets.package.templates.updates_table_widget' 13 | kwds = twc.Param() 14 | package_name = twc.Param('The name of the package to view') 15 | release_table = twc.Param() 16 | resource = 'bodhi' 17 | resource_path = 'query_updates' 18 | resources = Grid.resources + [bodhi_js, expander_js] 19 | 20 | def prepare(self): 21 | self.package_name = self.kwds['package_name'] 22 | self.subpackage_of = self.kwds.get('subpackage_of', '') 23 | self.total_rows = -1 24 | main_pkg = self.package_name 25 | if self.subpackage_of: 26 | main_pkg = self.subpackage_of 27 | 28 | self.filters = {'package': main_pkg} 29 | self.rows_per_page = 10 30 | 31 | releases = [] 32 | bodhi = get_connector('bodhi') 33 | 34 | for collection in bodhi.get_all_releases(): 35 | if collection['state'] != 'current': 36 | continue 37 | name = collection['id_prefix'] 38 | ver = collection['version'] 39 | label = collection['long_name'] 40 | branchname = collection['branch'] 41 | value = "" 42 | if branchname: 43 | value = branchname 44 | if label != 'Fedora devel' and name in ('FEDORA', 'FEDORA-EPEL' 45 | ): 46 | releases.append({ 47 | 'label': label, 48 | 'value': value, 49 | 'version': ver, 50 | }) 51 | 52 | def _sort(a,b): 53 | return cmp(int(b['version']), int(a['version'])) 54 | 55 | releases.sort(_sort) 56 | self.release_table = releases 57 | 58 | # Must do this last for our Grids 59 | super(Updates, self).prepare() 60 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/bugs_stats_widget.mak: -------------------------------------------------------------------------------- 1 | <% import tg %> 2 |
3 |
4 | 15 | 24 |
25 |
26 |

Open Bugs

27 | 32 |
33 |
34 |
35 |
36 |

Blocking Bugs

37 | 42 |
43 |
44 |
45 |
46 | -------------------------------------------------------------------------------- /validate_templates.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | from glob import glob 18 | from os import walk 19 | from os.path import join 20 | 21 | from xml.parsers import expat 22 | def rec_glob(top_dir, pattern): 23 | files = [] 24 | for (dirpath, dirnames, filenames) in walk(top_dir): 25 | files.extend(glob(join(dirpath, pattern))) 26 | 27 | return files 28 | 29 | class sax_callbacks: 30 | def startDocument(self): 31 | self.el_stack = [] 32 | 33 | def endDocument(self): 34 | if len(self.el_stack) > 0: 35 | raise Exception('Error: tags not closed %s', str(self.el_stack)) 36 | 37 | def startElement(self, tag, attrs): 38 | self.el_stack.append(tag) 39 | 40 | def endElement(self, tag): 41 | last_tag = self.el_stack.pop() 42 | if tag != last_tag: 43 | raise Exception('Error: mismatched tags (last_tage: %s, closing_tag: %s)', last_tag, tag) 44 | 45 | error_files = [] 46 | for mak_file in rec_glob('.', '*.mak'): 47 | f = open(mak_file, 'r') 48 | buf = f.read() 49 | f.close() 50 | 51 | handler = sax_callbacks() 52 | 53 | try: 54 | ctxt = expat.ParserCreate() 55 | handler.startDocument() 56 | ctxt.StartElementHandler = handler.startElement 57 | ctxt.EndElementHandler = handler.endElement 58 | ctxt.Parse(buf, 1) 59 | handler.endDocument() 60 | 61 | except Exception, e: 62 | if expat.ErrorString(e.code) != expat.errors.XML_ERROR_UNDEFINED_ENTITY: 63 | print "Parsing " + mak_file + " failed" 64 | print e 65 | 66 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/jsonconnector.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | """ 18 | :mod:`fedoracommunity.connectors.jsonconnector` - Simple Json Connector 19 | ======================================================================= 20 | 21 | This Connector works with any url which returns valid simplejson data 22 | 23 | .. moduleauthor:: Seth Vidal 24 | """ 25 | import logging 26 | log = logging.getLogger(__name__) 27 | 28 | from urllib import urlopen 29 | import simplejson 30 | from fedoracommunity.connectors.api import IConnector, ICall, IQuery 31 | 32 | 33 | class SimpleJsonConnector(IConnector, ICall, IQuery): 34 | _method_paths = {} 35 | _query_paths = {} 36 | 37 | def __init__(self, environ=None, request=None): 38 | super(SimpleJsonConnector, self).__init__(environ, request) 39 | # FIXME - sanity check this url or run it past a whitelist or what not 40 | 41 | def call(self, url): 42 | log.info('JsonConnector.call(%s)' % url) 43 | self._url = url 44 | json_cache = self._request.environ['beaker.cache'].get_cache('json') 45 | return json_cache.get_value(key=url, 46 | createfunc=self._get_json_url, 47 | expiretime=1800) 48 | 49 | def _get_json_url(self): 50 | # FIXME - LOTS OF ERROR CHECKING PLEASE 51 | # grab the json_url 52 | json_fp = urlopen(self._url) 53 | # decode it into python using simplejson 54 | json_data = simplejson.load(json_fp) 55 | json_fp.close() 56 | # return the object you get from it 57 | return json_data 58 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/typeaheadjs.css: -------------------------------------------------------------------------------- 1 | .dropdown-menu, span.twitter-typeahead .tt-hint { 2 | position: absolute; 3 | top: 100%; 4 | left: 0; 5 | z-index: 1000; 6 | display: none; 7 | float: left; 8 | min-width: 160px; 9 | padding: 5px 0; 10 | margin: 2px 0 0; 11 | font-size: 1rem; 12 | color: #373a3c; 13 | text-align: left; 14 | list-style: none; 15 | background-color: #fff!important; 16 | background-clip: padding-box; 17 | border: 1px solid rgba(0, 0, 0, 0.15); 18 | border-radius: 0.25rem; } 19 | 20 | .form-control.tt-query{ 21 | background-color:#fff!important; 22 | } 23 | 24 | .twitter-typeahead .tt-dropdown-menu{ 25 | top:2.5em!important; 26 | width: 100%; 27 | background: #fff; 28 | border: 1px solid rgba(0, 0, 0, 0.15); 29 | } 30 | 31 | span.twitter-typeahead .tt-suggestion { 32 | display: block; 33 | width: 100%; 34 | padding: 3px 20px; 35 | clear: both; 36 | font-weight: normal; 37 | line-height: 1.5; 38 | color: #373a3c; 39 | text-align: inherit; 40 | white-space: nowrap; 41 | background: none; 42 | border: 0; } 43 | span.twitter-typeahead .tt-suggestion:focus, .dropdown-item:hover, span.twitter-typeahead .tt-suggestion:hover { 44 | color: #2b2d2f; 45 | text-decoration: none; 46 | background-color: #f5f5f5; } 47 | span.twitter-typeahead .active.tt-suggestion, span.twitter-typeahead .tt-suggestion.tt-is-under-cursor, span.twitter-typeahead .active.tt-suggestion:focus, span.twitter-typeahead .tt-suggestion.tt-cursor:focus, span.twitter-typeahead .active.tt-suggestion:hover, span.twitter-typeahead .tt-suggestion.tt-cursor:hover { 48 | color: #fff; 49 | text-decoration: none; 50 | background-color: #0275d8; 51 | outline: 0; } 52 | span.twitter-typeahead .disabled.tt-suggestion, span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover { 53 | color: #818a91; } 54 | span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover { 55 | text-decoration: none; 56 | cursor: not-allowed; 57 | background-color: transparent; 58 | background-image: none; 59 | filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; } 60 | span.twitter-typeahead { 61 | width: 100%; } 62 | .input-group span.twitter-typeahead { 63 | display: block !important; } 64 | .input-group span.twitter-typeahead .tt-menu { 65 | top: 2.375rem !important; } 66 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/overview.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import tw2.core as twc 3 | 4 | from fedoracommunity.connectors.api import get_connector 5 | from fedoracommunity.widgets.grid import Grid 6 | 7 | log = logging.getLogger(__name__) 8 | 9 | class ActiveReleasesGrid(Grid): 10 | template = 'mako:fedoracommunity.widgets.package.templates.active_releases' 11 | package_name = twc.Param('The name of the package to view') 12 | resource = 'bodhi' 13 | resource_path = 'query_active_releases' 14 | 15 | def prepare(self): 16 | self.filters = {'package': self.package_name} 17 | self.rows_per_page = 10 18 | 19 | # Must do this last for our Grids 20 | super(ActiveReleasesGrid, self).prepare() 21 | 22 | 23 | class Details(twc.Widget): 24 | template = 'mako:fedoracommunity.widgets.package.templates.details' 25 | kwds = twc.Param('Data passed in from the tabs') 26 | package_info = twc.Param('A dict containing package details from xapian') 27 | active_releases_widget = ActiveReleasesGrid 28 | 29 | def prepare(self): 30 | package_name = self.kwds['package_name'] 31 | xapian_conn = get_connector('xapian') 32 | result = xapian_conn.get_package_info(package_name) 33 | self.package_name = package_name 34 | self.package_info = result 35 | latest_build = twc.Variable(default='Koji unavailable') 36 | super(Details, self).prepare() 37 | 38 | if result['name'] == package_name: 39 | self.summary = result['summary'] 40 | self.description = result['description'] 41 | else: 42 | for subpkg in result['sub_pkgs']: 43 | if subpkg['name'] == package_name: 44 | self.summary = subpkg['summary'] 45 | self.description = subpkg['description'] 46 | break 47 | 48 | self.package_info = result 49 | 50 | koji = get_connector('koji') 51 | try: 52 | builds = koji._koji_client.getLatestBuilds('rawhide', package=result['name']) 53 | if builds: 54 | self.latest_build = builds[0]['version'] + '-' + \ 55 | builds[0]['release'] 56 | else: 57 | self.latest_build = 'Not built in rawhide' 58 | except Exception, e: 59 | log.error('Unable to query koji: %s' % str(e)) 60 | 61 | def __repr__(self): 62 | return "
" % self.kwds 63 | -------------------------------------------------------------------------------- /fedoracommunity/plugins/extensions/groupalerts.js: -------------------------------------------------------------------------------- 1 | // This file is part of Fedora Community. 2 | // Copyright (C) 2008-2009 Red Hat, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as 6 | // published by the Free Software Foundation, either version 3 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | { 18 | info: { 19 | consumes:['alerts_groups'], 20 | author: 'John (J5) Palmieri ', 21 | version: '0.1', 22 | name: 'Group Alerts', 23 | summary: 'Displays users who have requested group access', 24 | description: 'Displays users who have requested group access \ 25 | that you have rights to \ 26 | \ 27 | Required Extension Point Data: \ 28 | \ 29 | \ None, you must be logged in though' 30 | }, 31 | 32 | run: function (data) { 33 | var burl = moksha.get_page_base_url(); 34 | var PROXY_URL = burl + 'proxy/fas/get_todo_list_page'; 35 | var FAS_URL = '//admin.fedoraproject.org/accounts/'; 36 | var self = this; 37 | var hidden_parent = undefined; 38 | 39 | if (data.hide_parent) 40 | hidden_parent = jQuery('#' + data.hide_parent); 41 | 42 | render = function(html) 43 | { 44 | var div = jQuery("#" + data.uid); 45 | var ul = jQuery(".queue", html); 46 | 47 | var links = jQuery("a", ul); 48 | for (var i=0; i < links.length; i++) 49 | { 50 | // for now rewrite to bring you to fas 51 | var l = jQuery(links[i]); 52 | l.attr('target', '_blank'); 53 | var href = l.attr('href'); 54 | l.attr('href', FAS_URL + href); 55 | } 56 | 57 | if(ul.length > 0) 58 | { 59 | div.append(ul); 60 | if (hidden_parent) 61 | hidden_parent.show(); 62 | } 63 | 64 | } 65 | 66 | jQuery.get(PROXY_URL, 67 | render, 68 | "html"); 69 | 70 | } 71 | } 72 | 73 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/patches.mak: -------------------------------------------------------------------------------- 1 | 20 | 21 | ${w.children[0].display(on_change='on_change', package=w.package, subpackage_of=w.subpackage_of)} 22 | 23 |
24 |
25 | % if w.patches: 26 | <%namespace file="diffstat.mak" import="render_diffstat"/> 27 | 28 | Show summary of all patches 29 | 34 | 35 | % for patch in w.patches: 36 | <% name = patch['name'] %> 37 | 38 | 39 | 40 | 41 | % endfor 42 |
${name}Added ${patch['age']} ago (${patch['date']})
43 | 44 | % else: 45 | No patches found 46 | % endif # if w.patches 47 | 48 | 89 |
90 |
91 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/tabs.mak: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 30 | 54 |
55 |
56 |
57 | % if w.widget: 58 | ${w.widget.display(args=w.args, kwds=w.kwds) | n } 59 | % else: 60 | Unable to render ${w.active_tab} tab. 61 | % endif 62 |
63 |
64 |
65 | 70 | 71 | -------------------------------------------------------------------------------- /fedoracommunity/config/middleware.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | from fedoracommunity.config.app_cfg import base_config 18 | from fedoracommunity.config.environment import load_environment 19 | 20 | import tg 21 | try: 22 | tg_version_tuple = tuple(map(int, tg.__version__.split('.')[:2])) 23 | except ValueError: 24 | tg_version_tuple = tuple(tg.__version__.split('.')[:2]) 25 | 26 | make_base_app = base_config.setup_tg_wsgi_app(load_environment) 27 | 28 | 29 | def make_app(global_conf, full_stack=True, **app_conf): 30 | from moksha.wsgi.middleware import make_moksha_middleware 31 | from fedoracommunity.connectors.api.mw import FCommConnectorMiddleware 32 | 33 | def make_middleware(app): 34 | if tg_version_tuple < (2, 1): 35 | app = base_config.add_tosca2_middleware(app) 36 | 37 | app = FCommConnectorMiddleware(app) 38 | app = make_moksha_middleware(app, tg.config) 39 | return app 40 | 41 | if tg_version_tuple >= (2, 1): 42 | app_conf['custom_tw2_config'] = { 43 | 'script_name': global_conf.get('fedoracommunity.script_name', '/') 44 | } 45 | 46 | app = make_base_app(global_conf, 47 | wrap_app=make_middleware, 48 | full_stack=full_stack, 49 | **app_conf) 50 | 51 | if base_config.squeeze: 52 | from repoze.squeeze.processor import ResourceSqueezingMiddleware 53 | app = ResourceSqueezingMiddleware( 54 | app, 55 | cache_dir='public/cache', 56 | url_prefix='/cache/', 57 | ) 58 | 59 | if base_config.profile: 60 | from repoze.profile.profiler import AccumulatingProfileMiddleware 61 | app = AccumulatingProfileMiddleware( 62 | app, 63 | log_filename='profile.log', 64 | discard_first_request=True, 65 | cachegrind_filename='./cachegrind.out', 66 | flush_at_shutdown=True, 67 | path='/__profile__' 68 | ) 69 | 70 | return app 71 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/contents.mak: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
6 |
7 | 8 | 40 | 50 |
51 | 52 |
53 |
54 |
55 |
56 |
57 |
58 | 61 |
62 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/widgets.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | import tw2.core as twc 18 | from tw2.core.params import Param 19 | 20 | 21 | class PagerWidget(twc.Widget): 22 | template = "mako:/myfedora/widgets/templates/pager.html" 23 | page = twc.Param('The page to view', default=1) 24 | last_page = twc.Param() 25 | show = twc.Param('The number of items to show', default=7) 26 | parent_dom_id = twc.Param() 27 | 28 | front_set = twc.Variable() 29 | back_set = twc.Variable() 30 | main_set = twc.Variable() 31 | prev_page = twc.Variable() 32 | next_page = twc.Variable() 33 | parent_id = twc.Variable() 34 | 35 | def prepare(self): 36 | super(PagerWidget, self).prepare() 37 | 38 | self.page = int(self.page) 39 | if self.page < 1: 40 | self.page = 1 41 | 42 | self.last_page = int(self.last_page) 43 | 44 | # how many of the main set do we show 45 | self.show = int(self.show) 46 | 47 | self.parent_id = self.parent_dom_id 48 | 49 | self.front_set = [] 50 | self.back_set = [] 51 | self.main_set = [] 52 | 53 | max_block_num = self.last_page / self.show 54 | 55 | # figure out main set 56 | block_num = self.page / self.show 57 | 58 | start = block_num * self.show + 1 59 | last_in_set = start + self.show 60 | if last_in_set >= self.last_page: 61 | start = self.last_page - self.show + 1 62 | if start < 1: 63 | start = 1 64 | 65 | last_in_set = self.last_page + 1 66 | block_num = max_block_num 67 | 68 | self.main_set = range(start, last_in_set) 69 | 70 | # do we need a front set 71 | if block_num > 0: 72 | self.front_set = [1] 73 | 74 | # do we need a back set 75 | if block_num < max_block_num: 76 | self.back_set = [self.last_page] 77 | 78 | self.prev_page = None 79 | if self.page > 1: 80 | self.prev_page = self.page - 1 81 | 82 | self.next_page = None 83 | if self.page < self.last_page: 84 | self.next_page = self.page + 1 85 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/reset.css: -------------------------------------------------------------------------------- 1 | /* `XHTML, HTML4, HTML5 Reset 2 | ----------------------------------------------------------------------------------------------------*/ 3 | 4 | a, 5 | abbr, 6 | acronym, 7 | address, 8 | applet, 9 | article, 10 | aside, 11 | audio, 12 | b, 13 | big, 14 | blockquote, 15 | body, 16 | canvas, 17 | caption, 18 | center, 19 | cite, 20 | code, 21 | dd, 22 | del, 23 | details, 24 | dfn, 25 | dialog, 26 | div, 27 | dl, 28 | dt, 29 | em, 30 | embed, 31 | fieldset, 32 | figcaption, 33 | figure, 34 | font, 35 | footer, 36 | form, 37 | h1, 38 | h2, 39 | h3, 40 | h4, 41 | h5, 42 | h6, 43 | header, 44 | hgroup, 45 | hr, 46 | html, 47 | i, 48 | iframe, 49 | img, 50 | ins, 51 | kbd, 52 | label, 53 | legend, 54 | li, 55 | mark, 56 | menu, 57 | meter, 58 | nav, 59 | object, 60 | ol, 61 | output, 62 | p, 63 | pre, 64 | progress, 65 | q, 66 | rp, 67 | rt, 68 | ruby, 69 | s, 70 | samp, 71 | section, 72 | small, 73 | span, 74 | strike, 75 | strong, 76 | sub, 77 | summary, 78 | sup, 79 | table, 80 | tbody, 81 | td, 82 | tfoot, 83 | th, 84 | thead, 85 | time, 86 | tr, 87 | tt, 88 | u, 89 | ul, 90 | var, 91 | video, 92 | xmp { 93 | border: 0; 94 | margin: 0; 95 | padding: 0; 96 | font-size: 100%; 97 | } 98 | 99 | html, 100 | body { 101 | height: 100%; 102 | } 103 | 104 | article, 105 | aside, 106 | details, 107 | figcaption, 108 | figure, 109 | footer, 110 | header, 111 | hgroup, 112 | menu, 113 | nav, 114 | section { 115 | /* 116 | Override the default (display: inline) for 117 | browsers that do not recognize HTML5 tags. 118 | 119 | IE8 (and lower) requires a shiv: 120 | http://ejohn.org/blog/html5-shiv 121 | */ 122 | display: block; 123 | } 124 | 125 | b, 126 | strong { 127 | /* 128 | Makes browsers agree. 129 | IE + Opera = font-weight: bold. 130 | Gecko + WebKit = font-weight: bolder. 131 | */ 132 | font-weight: bold; 133 | } 134 | 135 | img { 136 | color: transparent; 137 | font-size: 0; 138 | vertical-align: middle; 139 | /* 140 | For IE. 141 | http://css-tricks.com/ie-fix-bicubic-scaling-for-images 142 | */ 143 | -ms-interpolation-mode: bicubic; 144 | } 145 | 146 | li { 147 | /* 148 | For IE6 + IE7. 149 | */ 150 | display: list-item; 151 | } 152 | 153 | table { 154 | border-collapse: collapse; 155 | border-spacing: 0; 156 | } 157 | 158 | th, 159 | td, 160 | caption { 161 | font-weight: normal; 162 | vertical-align: top; 163 | text-align: left; 164 | } 165 | 166 | q { 167 | quotes: none; 168 | } 169 | 170 | q:before, 171 | q:after { 172 | content: ''; 173 | content: none; 174 | } 175 | 176 | sub, 177 | sup, 178 | small { 179 | font-size: 75%; 180 | } 181 | 182 | sub, 183 | sup { 184 | line-height: 0; 185 | position: relative; 186 | vertical-align: baseline; 187 | } 188 | 189 | sub { 190 | bottom: -0.25em; 191 | } 192 | 193 | sup { 194 | top: -0.5em; 195 | } 196 | 197 | svg { 198 | /* 199 | For IE9. 200 | */ 201 | overflow: hidden; 202 | } -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/package_chrome.mak: -------------------------------------------------------------------------------- 1 | 2 | <% 3 | from urllib import quote 4 | import tg 5 | 6 | icon = w.package_info['icon'] 7 | package_name = w.kwds['package_name'] 8 | if package_name != w.package_info['name']: 9 | # subpackage 10 | for sub_pkg in w.package_info['sub_pkgs']: 11 | if sub_pkg['name'] == package_name: 12 | sub_icon = sub_pkg.get('icon', None) 13 | if sub_icon: 14 | icon = sub_icon 15 | 16 | break 17 | 18 | icon_url = tg.url("/images/icons/%s" % icon) 19 | %> 20 |
21 |
22 |
23 | 24 |
25 |

${w.kwds['package_name']} 26 | 27 | 30 | 37 | 38 |

39 | % if w.kwds['package_name'] != w.package_info['name']: 40 | Subpackage of ${w.package_info['name']} 41 | % endif 42 |
${w.summary}
43 |
44 |

Install this package:

45 | dnf install ${w.kwds['package_name']} 46 |
47 |
48 |
49 | 50 |
51 | 52 |
53 | ${w.children[0].display(args=w.args, kwds=w.kwds) | n} 54 |
55 | 56 |
57 | 58 | -------------------------------------------------------------------------------- /fedoracommunity/config/app_cfg.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | from fedoracommunity.lib import app_globals 18 | import fedoracommunity 19 | import fedoracommunity.lib 20 | 21 | from tg.configuration import AppConfig 22 | from paste.deploy.converters import asbool 23 | try: 24 | # TG-2.3 25 | from tg.i18n import ugettext 26 | except ImportError: 27 | # Earlier TG2 28 | from pylons.i18n import ugettext 29 | 30 | 31 | class FedoraCommunityConfig(AppConfig): 32 | tw2_initialized = False 33 | 34 | def add_tosca2_middleware(self, app): 35 | if self.tw2_initialized: 36 | return app 37 | 38 | from tg import config 39 | from tw2.core.middleware import TwMiddleware 40 | default_tw2_config = dict( 41 | default_engine=self.default_renderer, 42 | translator=ugettext, 43 | auto_reload_templates=asbool( 44 | self.get('templating.mako.reloadfromdisk', 'false')) 45 | ) 46 | res_prefix = config.get('fedoracommunity.resource_path_prefix') 47 | if res_prefix: 48 | default_tw2_config['res_prefix'] = res_prefix 49 | script_name = config.get('fedoracommunity.script_name') 50 | if script_name: 51 | default_tw2_config['script_name'] = script_name 52 | if getattr(self, 'custom_tw2_config', None): 53 | default_tw2_config.update(self.custom_tw2_config) 54 | app = TwMiddleware(app, **default_tw2_config) 55 | self.tw2_initialized = True 56 | return app 57 | 58 | 59 | base_config = FedoraCommunityConfig() 60 | base_config.renderers = [] 61 | base_config.use_dotted_templatenames = True 62 | 63 | base_config.use_toscawidgets = False 64 | base_config.use_toscawidgets2 = True 65 | 66 | base_config.package = fedoracommunity 67 | 68 | # Set the default renderer 69 | base_config.default_renderer = 'mako' 70 | base_config.renderers.append('mako') 71 | base_config.renderers.append('genshi') 72 | base_config.auto_reload_templates = True 73 | base_config.use_legacy_renderer = False 74 | 75 | # Configure the base SQLALchemy Setup 76 | # fix this later 77 | base_config.use_sqlalchemy = False 78 | 79 | # Enable profiling middleware. 80 | base_config.profile = False 81 | 82 | # Enable squeeze middlware 83 | base_config.squeeze = False 84 | 85 | base_config.disable_request_extensions = True 86 | 87 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/planet-fedora-bubbles.css: -------------------------------------------------------------------------------- 1 | /* mad props to Steven Garrity who did the original html/css for Planet GNOME's bubbles, which heavily inspired this. */ 2 | 3 | div.entry { 4 | clear: none; 5 | margin-bottom: 1em; 6 | padding-bottom: 1em; 7 | } 8 | 9 | div.person-info { 10 | background: transparent url('/community/images/planet-bubbles/point.png') no-repeat scroll right; 11 | float: left; 12 | bottom: 18px; 13 | left: 2.5em; 14 | margin-left: -5em !important; 15 | margin-top: 8px !important; 16 | padding: 0 1em 0 1em; 17 | position: relative; 18 | text-align: center; 19 | width: 9em; 20 | z-index: 1; 21 | overflow: hidden; 22 | min-height: 40px; 23 | } 24 | 25 | div.person-info a img { 26 | border: 0 none; 27 | margin-bottom: .2em; 28 | padding: 0px 24px; 29 | display: block; 30 | min-height: 40px !important; 31 | margin-left: auto !important; 32 | margin-right: auto !important; 33 | } 34 | 35 | div.person-info img { 36 | max-width: 50px; 37 | max-height: 50px; 38 | } 39 | 40 | div.person-info a { 41 | float: left; 42 | text-align: center; 43 | width: 94%; 44 | } 45 | 46 | div.post { 47 | margin-left: 8em; 48 | margin-top: 2.2em; 49 | padding: .25em 1.6em; 50 | position: relative; 51 | min-height: 68px; 52 | padding-left: 2.2em; 53 | } 54 | 55 | h4.post-title { 56 | font-weight: strong; 57 | font-size: medium; 58 | margin-top: 9px; 59 | position: relative; 60 | z-index: 1; 61 | margin-bottom: -\0px; 62 | } 63 | 64 | .post-contents { 65 | line-height: 140%; 66 | overflow: auto; 67 | position: relative; 68 | z-index: 1; 69 | min-height: 35px; 70 | margin-top: none; 71 | } 72 | 73 | .post-footer { 74 | margin-top: 1em; 75 | } 76 | 77 | b.lt { 78 | background-position: left top; 79 | left: 0; 80 | top: 0; 81 | } 82 | 83 | b.vt { 84 | background: transparent url('/community/images/planet-bubbles/vert.png') repeat-y scroll 0 0; 85 | height:100%; 86 | position: absolute; 87 | width: 5px; 88 | } 89 | 90 | b.rt { 91 | background-position: right top; 92 | right: 0; 93 | top: 0; 94 | } 95 | 96 | b.to { 97 | background-position: left top; 98 | left: 0; 99 | top: 0; 100 | } 101 | 102 | b.hz { 103 | background: transparent url('/community/images/planet-bubbles/horiz.png') repeat-x scroll 0 0; 104 | height: 8px; 105 | position: absolute; 106 | width: 100%; 107 | } 108 | 109 | b.bo { 110 | background-position: left bottom; 111 | bottom: 0; 112 | left: 0; 113 | } 114 | 115 | b.tl { 116 | background-position: left top; 117 | left: 0; 118 | top: 0; 119 | } 120 | 121 | b.cr { 122 | background-image: url('/community/images/planet-bubbles/corners.png'); 123 | height: 50px; 124 | position: absolute; 125 | width: 50px; 126 | } 127 | 128 | b.tr { 129 | background-position: right top; 130 | right: 0; 131 | top: 0; 132 | } 133 | 134 | b.bl { 135 | background-position: left bottom; 136 | bottom: 0; 137 | left: 0; 138 | } 139 | 140 | b.br { 141 | background-position: right bottom; 142 | bottom: 0; 143 | right: 0; 144 | } 145 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/changelog_table_widget.mak: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 20 |
21 |
22 |
23 | 24 | 34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 52 | 56 | 59 | 60 | 61 |
VersionChangesAuthorDate
47 | ${'${version}'} 48 | 50 | {{html _text_filter(text)}} 51 | 53 | ${'${author}'}
54 | <${'${email}'}> 55 |
57 | ${'${display_date}'} 58 |
62 |
63 |
64 | This package has no Changelog entries 65 |
66 |
67 |
68 |
69 | Viewing all Changelog entries 70 |
71 |
72 |
73 |
74 | Viewing ${'${first_visible_row}'}-${'${last_visible_row}'} of ${'${total_rows}'} Changelog entries 75 |
76 |
77 | 78 |
79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/updates_table_widget.mak: -------------------------------------------------------------------------------- 1 | <% import tg %> 2 | 3 | 4 | 5 |
6 |
7 |
8 |
9 | 10 | 16 | 17 | 24 | 25 |
26 |
27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 50 | 53 | 54 | 55 |
VersionAgeStatus 
40 | {{html render_update_builds(title)}} 41 | ${'${date_pushed_display}'}${'${status}'} 44 | 49 | 51 | {{html details}} 52 |
56 | 57 |
58 |
59 | There are no updates for this package 60 |
61 |
62 |
63 |
64 | Viewing all ${'${total_rows}'} updates for this package 65 |
66 |
67 |
68 |
69 | Viewing ${'${first_visible_row}'}-${'${last_visible_row}'} of ${'${total_rows}'} updates for this packahge 70 |
71 |
72 |
73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/myfedora-branding.css: -------------------------------------------------------------------------------- 1 | div#head h1 a { 2 | background: transparent url('/community/images/fedora-packages-logo.png') no-repeat scroll 10px 50%; 3 | width: 236px; 4 | } 5 | 6 | .fedora-package-logo div { 7 | background: transparent url('/community/images/fedora-packages-logo.png') no-repeat scroll 10px 50%; 8 | width: 236px; 9 | } 10 | 11 | .login-banner img { 12 | float: right; 13 | padding-top: 9px; 14 | padding-right: 5px; 15 | padding-left: 5px; 16 | } 17 | 18 | img#main-banner { 19 | min-height: 199px; 20 | } 21 | 22 | .col-spread h4 { 23 | font-size: large; 24 | font-weight: normal; 25 | } 26 | 27 | .col-spread > div { 28 | width: 30%; 29 | float: left; 30 | margin: 10px; 31 | } 32 | 33 | .col-spread div div { 34 | background-color: #eee; 35 | -moz-border-radius: 6px; 36 | padding: 1em; 37 | margin-top: .4em; 38 | } 39 | 40 | .col-spread div p { 41 | min-height: 16em !important; 42 | } 43 | 44 | #tour a.button:link, 45 | #tour a.button:visited, 46 | #tour a.button:active { 47 | display: block; 48 | background-color: #66a2de; 49 | color: white !important; 50 | -moz-border-radius: 3px; 51 | border: 0px; 52 | padding: .5em 1em; 53 | text-transform: uppercase; 54 | font-weight: bold; 55 | text-decoration: none; 56 | margin-left: auto; 57 | margin-right: auto; 58 | text-align: center; 59 | } 60 | 61 | 62 | #tour h2 { 63 | font-size: 200% !important; 64 | } 65 | 66 | #left-content-column #tour h3 { 67 | margin-bottom: 1em; 68 | font-size: 1.5em !important; 69 | text-transform: capitalize; 70 | color: #555 !important; 71 | } 72 | 73 | #tour h4 a { 74 | font-size: 1.4em; 75 | color: #777; 76 | border-bottom: 1px solid #ddd; 77 | padding-top: 3em; 78 | } 79 | 80 | #tour ul { 81 | padding-bottom: 28px; 82 | } 83 | 84 | #tour h4 span a { 85 | padding-left: 1em; 86 | font-size: 1em !important; 87 | color: #337ACC !important; 88 | text-decoration: none; 89 | padding-bottom: 1px; 90 | } 91 | 92 | #tour h4 span a:hover { 93 | color: #bbb !important; 94 | } 95 | 96 | #tour .tour-summary { 97 | padding: 12px 16px; 98 | margin: 20px 2px; 99 | background-color: #eee; 100 | -moz-border-radius: 6px; 101 | } 102 | 103 | #tour .tour-summary h4 { 104 | font-size: 1.4em; 105 | color: #777; 106 | } 107 | 108 | 109 | 110 | #tour .check-it-out .left-col { 111 | background-color: #d0e3f6; 112 | float: left; 113 | width: 60%; 114 | padding: 12px; 115 | -moz-border-radius-topleft: 6px; 116 | -moz-border-radius-bottomleft: 6px; 117 | margin-right: 4px; 118 | min-height: 14em; 119 | } 120 | 121 | #tour .check-it-out .right-col { 122 | background-color: #ddd; 123 | float: left; 124 | width: 30%; 125 | padding: 12px; 126 | -moz-border-radius-topright: 6px; 127 | -moz-border-radius-bottomright: 6px; 128 | min-height: 14em; 129 | } 130 | 131 | #tour .check-it-out { 132 | padding: 24px 12px; 133 | padding-top: 12px; 134 | } 135 | 136 | #tour .check-it-out a.button { 137 | margin-top: 3em; 138 | width: 8em; 139 | } 140 | 141 | #tour div.check-it-out h5 { 142 | font-size: 1.3em !important; 143 | text-transform: uppercase; 144 | color: #2b81d6; 145 | } 146 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/bugs.py: -------------------------------------------------------------------------------- 1 | import tw2.core as twc 2 | import datetime 3 | import urllib 4 | 5 | from fedoracommunity.widgets.grid import Grid 6 | from fedoracommunity.connectors.api import get_connector 7 | 8 | 9 | class BugStatsWidget(twc.Widget): 10 | template = "mako:fedoracommunity.widgets.package.templates.bugs_stats_widget" 11 | id = twc.Param(default='bugs_widget') 12 | kwds = twc.Param(default=None) 13 | 14 | version = twc.Param(default='rawhide') 15 | epel_version = twc.Param(default='epel7') 16 | num_open = twc.Param(default='-') 17 | 18 | bz_prefix = "https://bugzilla.redhat.com/buglist.cgi" 19 | status_open_string = "bug_status=__open__" 20 | status_closed_string = "bug_status=__closed__" 21 | 22 | base_query_string = twc.Variable(default='') 23 | 24 | def prepare(self): 25 | super(BugStatsWidget, self).prepare() 26 | # To get more than one key/value pair with the same key in urllib.urlencode, we need to create a tuple first 27 | self.query_product = ( 28 | ("query_format", "advanced"), 29 | ("product", "Fedora"), 30 | ("product", "Fedora EPEL"), 31 | ("component", self.package)) 32 | # Here we use the tuple and the package to create a string for bugzilla 33 | self.base_query_string = urllib.urlencode(self.query_product) 34 | 35 | class BugsGrid(Grid): 36 | resource = 'bugzilla' 37 | resource_path = 'query_bugs' 38 | release_table = twc.Param() 39 | template = "mako:fedoracommunity.widgets.package.templates.bugs_table_widget" 40 | 41 | def prepare(self): 42 | 43 | # Signify that we haven't loaded any bugs yet. 44 | self.total_rows = -1 45 | 46 | releases = [] 47 | self.filters = {'package': self.package} 48 | bodhi = get_connector('bodhi') 49 | 50 | for collection in bodhi.get_all_releases(): 51 | if collection['state'] != 'current': 52 | continue 53 | name = collection['id_prefix'] 54 | ver = collection['version'] 55 | label = collection['long_name'] 56 | value = str(ver) 57 | 58 | if name in ('FEDORA', 'Rawhide', 'FEDORA-EPEL'): 59 | releases.append({'label': label, 'value': value, 'version': ver}) 60 | 61 | releases.append({'label': 'Rawhide', 'value': 'rawhide', 'version': 9999999}) 62 | 63 | def _sort(a,b): 64 | return cmp(int(b['version']), int(a['version'])) 65 | 66 | releases.sort(_sort) 67 | self.release_table = releases 68 | 69 | super(BugsGrid, self).prepare() 70 | 71 | 72 | class BugsWidget(twc.Widget): 73 | bug_stats = BugStatsWidget 74 | bug_grid = BugsGrid 75 | kwds = twc.Param() 76 | template = "mako:fedoracommunity.widgets.package.templates.bugs" 77 | 78 | def prepare(self): 79 | super(BugsWidget, self).prepare() 80 | self.package = self.kwds['package_name'] 81 | self.main_package = self.kwds.get('subpackage_of', '') 82 | 83 | if not self.main_package: 84 | self.main_package = self.package 85 | 86 | # This is here so you can hit packages/kernel/bugs/all 87 | if self.args == ['all']: 88 | self.children[1].rows_per_page = 100000 89 | -------------------------------------------------------------------------------- /fedoracommunity/templates/search.mak: -------------------------------------------------------------------------------- 1 | <%namespace file="fedoracommunity.templates.header" import="resources" /> 2 | <%namespace file="fedoracommunity.templates.footer" import="*" /> 3 | 4 | 5 | 6 | 7 | ${title} 8 | 9 | 10 | 11 | 14 | 16 | 18 | 19 | 28 | 29 | 30 | 31 | ${resources()} 32 |
33 |
34 |
35 | 36 | 39 | 40 |
41 |
42 | 74 |
75 | ${tmpl_context.widget.display(**options) | n} 76 |
77 |
78 |
79 |
80 | ${footer()} 81 | 82 | 83 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/grid.py: -------------------------------------------------------------------------------- 1 | # This file is part of Moksha. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import uuid 17 | import simplejson as json 18 | 19 | from tg import config 20 | from paste.deploy.converters import asbool 21 | 22 | import tw2.core as twc 23 | import tw2.forms 24 | import tw2.jquery 25 | import tw2.jqplugins.ui 26 | 27 | from moksha.wsgi.lib.helpers import when_ready 28 | from fedoracommunity.widgets.jquery_template import jquery_template_js 29 | 30 | moksha_ui_grid_js = twc.JSLink( 31 | filename='static/javascript/ui/moksha.ui.grid.js', 32 | modname=__name__, 33 | resources=[ 34 | tw2.jqplugins.ui.jquery_ui_js, 35 | jquery_template_js, 36 | ], 37 | ) 38 | 39 | moksha_ui_popup_js = twc.JSLink( 40 | filename='static/javascript/ui/moksha.ui.popup.js', 41 | modname=__name__, 42 | resources=[ 43 | tw2.jqplugins.ui.jquery_ui_js, 44 | ], 45 | ) 46 | 47 | 48 | class Grid(tw2.forms.widgets.FormField): 49 | resources = [tw2.jqplugins.ui.jquery_ui_js, 50 | moksha_ui_grid_js, 51 | moksha_ui_popup_js] 52 | params= ['rows_per_page', 'page_num', 'total_rows', 53 | 'filters', 'unique_key', 'sort_key', 'sort_order', 54 | 'row_template', 'resource', 'resource_path', 55 | 'loading_throbber', 'uid', 'more_link'] 56 | hidden = True # hide from the moksha main menu 57 | 58 | id = twc.Param(default=None) 59 | rows_per_page = twc.Param(default=10) 60 | page_num = twc.Param(default=1) 61 | total_rows = twc.Param(default=0) 62 | filters = twc.Param(default=None) 63 | unique_key = twc.Param(default=None) 64 | sort_key = twc.Param(default=None) 65 | sort_order = twc.Param(default=-1) 66 | row_template = twc.Param(default=None) 67 | resource = twc.Param(default=None) 68 | resource_path = twc.Param(default=None) 69 | loading_throbber = twc.Param(default=None) 70 | uid = twc.Param(default=None) 71 | more_link = twc.Param(default=None) 72 | onReady = None 73 | 74 | def prepare(self): 75 | """ 76 | Subclasses *must* call super as the last thing in their prepare() method 77 | """ 78 | super(Grid, self).prepare() 79 | 80 | if not self.filters: 81 | self.filters = {} 82 | 83 | grid_d = {} 84 | for p in self.params: 85 | v = getattr(self, p) 86 | if v is not None: 87 | grid_d[p] = v 88 | 89 | self.id = self.__class__.__name__ + str(uuid.uuid4()) 90 | 91 | onready = getattr(self, 'onReady') 92 | if onready: 93 | grid_d['loadOnCreate'] = False 94 | 95 | if onready: 96 | self.add_call(when_ready("%s; %s;" % (tw2.jquery.jQuery("#%s" % self.id).mokshagrid(grid_d), onready))) 97 | else: 98 | self.add_call(when_ready(tw2.jquery.jQuery("#%s" % self.id).mokshagrid(grid_d))) 99 | -------------------------------------------------------------------------------- /devel/docker/fedora-packages.conf: -------------------------------------------------------------------------------- 1 | LoadModule expires_module modules/mod_expires.so 2 | LoadModule headers_module modules/mod_headers.so 3 | LoadModule deflate_module modules/mod_deflate.so 4 | 5 | ExpiresActive On 6 | #ExpiresDefault "access plus 300 seconds" 7 | 8 | ErrorLog logs/fedoracommunity_error_log 9 | CustomLog logs/fedoracommunity_access_log combined 10 | 11 | AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/x-javascript 12 | 13 | # This caching may not necessarily be ideal, or even correct. 14 | # However, it was the only I could get firebug to show me 302's for 15 | # my ToscaWidget resources. 16 | 17 | Header unset Cache-Control 18 | Header unset Etag 19 | Header add Cache-Control "max-age=2592000" 20 | #ExpiresDefault A2592000 21 | 22 | 23 | # we are deploying the packager app that is part of the new Fedora Community 24 | Alias /packages/css /usr/share/fedoracommunity/fedoracommunity/public/css 25 | Alias /packages/javascript /usr/share/fedoracommunity/fedoracommunity/public/javascript 26 | Alias /packages/images/icons /var/cache/fedoracommunity/packages/xapian/icons 27 | Alias /packages/images /usr/share/fedoracommunity/fedoracommunity/public/images 28 | Alias /packages/_res /usr/share/fedoracommunity/fedoracommunity/public/toscawidgets/resources/ 29 | 30 | Alias /packages/tw2/resources/tw2.jqplugins.ui/static /usr/lib/python2.7/site-packages/tw2/jqplugins/ui/static 31 | Alias /packages/tw2/resources/tw2.jquery/static /usr/lib/python2.7/site-packages/tw2/jquery/static 32 | Alias /packages/tw2/resources/fedoracommunity.connectors.widgets.widgets/static /usr/lib/python2.7/site-packages/fedoracommunity/connectors/widgets/static 33 | 34 | 35 | Require all granted 36 | 37 | 38 | 39 | Require all granted 40 | 41 | 42 | 43 | Require all granted 44 | 45 | 46 | # Temporarily disabled until we can figure out how to get the moksha 47 | # javascript resources pulled in with `python setup.py archive_tw_resources` 48 | #Alias /community/toscawidgets /usr/share/fedoracommunity/public/toscawidgets 49 | 50 | WSGIPythonEggs /var/cache/fedoracommunity/.python-eggs 51 | WSGIDaemonProcess fedoracommunity user=apache maximum-requests=50000 display-name=fedoracommunity processes=2 threads=1 52 | WSGISocketPrefix run/wsgi 53 | WSGIRestrictStdout Off 54 | WSGIRestrictSignal Off 55 | WSGIPythonOptimize 1 56 | WSGIScriptReloading On 57 | 58 | WSGIScriptAlias /packages /usr/share/fedoracommunity/fedora-packages.wsgi 59 | 60 | 61 | Require all granted 62 | WSGIProcessGroup fedoracommunity 63 | 64 | 65 | 66 | Require all granted 67 | 68 | 69 | 70 | # If someone tries to access an icon that doesn't exist, 71 | # then send them to the default icon. This is used by 72 | # fedmenu, which will request icons for packages that 73 | # don't necessarily have them. The UI will look weird 74 | # unless those get magically redirected to a nice default. 75 | Require all granted 76 | ErrorDocument 404 https://apps.fedoraproject.org/packages/images/icons/package_128x128.png 77 | 78 | -------------------------------------------------------------------------------- /bootstrap.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # This file is part of Fedora Packages. 3 | # Copyright (C) 2012 Red Hat, Inc. 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as 7 | # published by the Free Software Foundation, either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | 18 | import os 19 | import sys 20 | import subprocess 21 | 22 | 23 | def run(cmd): 24 | print(cmd) 25 | subprocess.call(cmd, shell=True) 26 | 27 | 28 | def install_deps(): 29 | """ Should only be run once. First-time moksha setup. """ 30 | if os.path.exists('/etc/redhat-release'): 31 | reqs = [ 32 | 'python-kitchen', 'python-fedora', 'python-bugzilla', 'koji', 33 | 'xapian-bindings-python', 'diffstat', 'fedpkg', 'svn', 'wget', 34 | 'python-xappy', 'python-webob', 'moksha', 'TurboGears2', 35 | 'python-dogpile-cache', 'python-dogpile-core', 36 | 'python-memcached', 'memcached', 37 | 'python-markdown', 38 | ] 39 | run('sudo dnf install -q -y ' + ' '.join(reqs)) 40 | 41 | 42 | snapshot_url = 'http://lmacken.fedorapeople.org/fedora-packages' 43 | 44 | 45 | def download_db_snapshot(): 46 | """ Download a snapshot of our xapian database """ 47 | run('wget -N %s/xapian-LATEST.tar.xz' % snapshot_url) 48 | run('tar xvf xapian-LATEST.tar.xz') 49 | 50 | 51 | def download_icons(): 52 | """ Download a snapshot of all package icons """ 53 | icon_dir = 'fedoracommunity/public/images/' 54 | if not os.path.isdir(icon_dir + 'icons'): 55 | run('wget -N %s/icons.tar.xz' % snapshot_url) 56 | run('tar xvf icons.tar.xz') 57 | run('mv icons %s' % icon_dir) 58 | 59 | 60 | def link_external_libs(): 61 | """ Link rpm modules in from the system site-packages. """ 62 | location = 'python{major}.{minor}/site-packages'.format( 63 | major=sys.version_info.major, minor=sys.version_info.minor) 64 | template = 'ln -s /usr/{location}/{lib} {venv}/{location}/' 65 | for lib in ['koji', 'rpm', 'rpmUtils', 'fedora', 'kitchen', 'pycurl', 66 | 'urlgrabber', 'sqlitecachec', '_sqlitecache', 67 | 'bugzilla', 'xapian', 'xappy', 68 | 'dogpile', 'memcache' 69 | ]: 70 | for libdir in ('lib64', 'lib'): 71 | for ext in ('.py', '.so', ''): 72 | mod = '/usr/%s/%s/%s%s' % (libdir, location, lib, ext) 73 | if os.path.exists(mod): 74 | template = 'ln -s /usr/{libdir}/{location}/{lib}{ext} {venv}/{libdir}/{location}/' 75 | cmd = template.format(libdir=libdir, ext=ext, lib=lib, 76 | venv=os.environ['VIRTUAL_ENV'], 77 | location=location) 78 | print cmd 79 | run(cmd) 80 | 81 | 82 | def develop(): 83 | run('%s setup.py develop' % sys.executable) 84 | 85 | 86 | if __name__ == '__main__': 87 | install_deps() 88 | link_external_libs() 89 | develop() 90 | download_db_snapshot() 91 | download_icons() 92 | -------------------------------------------------------------------------------- /fedoracommunity/public/css/text.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family: 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,sans-serif; 3 | font-size: 13px; 4 | } 5 | a:focus { 6 | outline:1px dotted 7 | } 8 | hr { 9 | border:0 #ccc solid; 10 | border-top-width:1px; 11 | clear:both; 12 | height:0 13 | } 14 | 15 | h1 { 16 | font-size:25px 17 | } 18 | 19 | h2 { 20 | font-size:23px 21 | } 22 | 23 | h3 { 24 | font-size:21px 25 | } 26 | 27 | h4 { 28 | font-size:19px 29 | } 30 | 31 | h5 { 32 | font-size:17px 33 | } 34 | 35 | h6 { 36 | font-size:15px 37 | } 38 | 39 | ol { 40 | list-style:decimal 41 | } 42 | 43 | ul { 44 | list-style:disc 45 | } 46 | 47 | li { 48 | margin-left:30px 49 | } 50 | 51 | p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset { 52 | margin-bottom:20px 53 | } 54 | 55 | /* new bulletproof @font-face syntax from http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax */ 56 | 57 | @font-face { 58 | font-family: 'ComfortaaThin'; 59 | src: url('fonts/Comfortaa_Thin-webfont.eot?#iefix') format('embedded-opentype'), 60 | url('fonts/Comfortaa_Thin-webfont.ttf') format('truetype'), 61 | url('fonts/Comfortaa_Thin-webfont.svg#webfontReo2lGxG') format('svg'); 62 | font-weight: normal; 63 | font-style: normal; 64 | } 65 | 66 | @font-face { 67 | font-family: 'ComfortaaRegular'; 68 | src: url('fonts/Comfortaa_Regular-webfont.eot?#iefix') format('embedded-opentype'), 69 | url('fonts/Comfortaa_Regular-webfont.ttf') format('truetype'), 70 | url('fonts/Comfortaa_Regular-webfont.svg#webfontxbL3cos8') format('svg'); 71 | font-weight: normal; 72 | font-style: normal; 73 | } 74 | 75 | @font-face { 76 | font-family: 'ComfortaaBold'; 77 | src: url('fonts/Comfortaa_Bold-webfont.eot?#iefix') format('embedded-opentype'), 78 | url('fonts/Comfortaa_Bold-webfont.ttf') format('truetype'), 79 | url('fonts/Comfortaa_Bold-webfont.svg#webfontjkcnhWWT') format('svg'); 80 | font-weight: normal; 81 | font-style: normal; 82 | } 83 | 84 | @font-face { 85 | font-family: 'CantarellRegular'; 86 | src: url('fonts/Cantarell-Regular-webfont.eot?#iefix') format('embedded-opentype'), 87 | url('fonts/Cantarell-Regular-webfont.ttf') format('truetype'), 88 | url('fonts/Cantarell-Regular-webfont.svg#webfontPQ4tPnyo') format('svg'); 89 | font-weight: normal; 90 | font-style: normal; 91 | } 92 | 93 | @font-face { 94 | font-family: 'CantarellBold'; 95 | src: url('fonts/Cantarell-Bold-webfont.eot?#iefix') format('embedded-opentype'), 96 | url('fonts/Cantarell-Bold-webfont.ttf') format('truetype'), 97 | url('fonts/Cantarell-Bold-webfont.svg#webfont3gCLDhwY') format('svg'); 98 | font-weight: normal; 99 | font-style: normal; 100 | } 101 | 102 | @font-face { 103 | font-family: 'CantarellBoldOblique'; 104 | src: url('fonts/Cantarell-BoldOblique-webfont.eot?#iefix') format('embedded-opentype'), 105 | url('fonts/Cantarell-BoldOblique-webfont.ttf') format('truetype'), 106 | url('fonts/Cantarell-BoldOblique-webfont.svg#webfont3gCLDhwY') format('svg'); 107 | font-weight: normal; 108 | font-style: normal; 109 | } 110 | 111 | @font-face { 112 | font-family: 'CantarellOblique'; 113 | src: url('fonts/Cantarell-Oblique-webfont.eot?#iefix') format('embedded-opentype'), 114 | url('fonts/Cantarell-Oblique-webfont.ttf') format('truetype'), 115 | url('fonts/Cantarell-Oblique-webfont.svg#webfont3gCLDhwY') format('svg'); 116 | font-weight: normal; 117 | font-style: normal; 118 | } 119 | -------------------------------------------------------------------------------- /fedoracommunity/templates/header.mak: -------------------------------------------------------------------------------- 1 | 2 | <%def name="resources()"> 3 | ${tmpl_context.moksha_global_resources() | n} 4 | 5 | <%def name="header()"> 6 | 7 | 8 |
9 | ${resources()} 10 | 11 |
12 |
13 | 19 |
21 |
22 |
23 | 24 | Fedora Packages 25 | 26 |
27 |
28 |
29 |
30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 |
38 |
39 |
40 | 41 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/bugs_table_widget.mak: -------------------------------------------------------------------------------- 1 |
2 | 32 |
33 |
34 |
35 | 36 | 42 | 43 | 47 |
48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 65 | 68 | 71 | 72 | 73 |
BugStatusDescriptionRelease
60 | ${'${id}'} 61 | 63 | ${'${status}'} 64 | 66 | ${'${description}'} 67 | 69 | ${'${release}'} 70 |
74 |
75 |
76 | Loading bugs... please hold on. 77 |
78 |
79 |
80 |
81 | This package has no bugs - go file some!!! 82 |
83 |
84 | 89 |
90 |
91 | Viewing ${'${first_visible_row}'}-${'${last_visible_row}'} of ${'${total_rows}'} bugs 92 |
93 |
94 |
95 |
96 | -------------------------------------------------------------------------------- /fedoracommunity/connectors/fafconnector.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | import requests 18 | from paste.httpexceptions import HTTPBadRequest 19 | from paste.httpexceptions import HTTPBadGateway 20 | 21 | from fedoracommunity.connectors.api import \ 22 | IConnector, IQuery, ParamFilter 23 | 24 | class FafConnector(IConnector, IQuery): 25 | _method_paths = {} 26 | _query_paths = {} 27 | _cache_prompts = {} 28 | 29 | # IConnector 30 | @classmethod 31 | def register(cls): 32 | cls.register_query_problems() 33 | 34 | #IQuery 35 | @classmethod 36 | def register_query_problems(cls): 37 | path = cls.register_query( 38 | 'query_problems', 39 | cls.query_problems, 40 | cache_prompt=None, 41 | primary_key_col='id', 42 | default_sort_col='count', 43 | default_sort_order=-1, 44 | can_paginate=True) 45 | 46 | path.register_column( 47 | 'id', 48 | default_visible=True, 49 | can_sort=True, 50 | can_filter_wildcards=False) 51 | 52 | path.register_column( 53 | 'status', 54 | default_visible=True, 55 | can_sort=True, 56 | can_filter_wildcards=False) 57 | 58 | path.register_column( 59 | 'crash_function', 60 | default_visible=True, 61 | can_sort=True, 62 | can_filter_wildcards=True) 63 | 64 | path.register_column( 65 | 'count', 66 | default_visible=True, 67 | can_sort=True, 68 | can_filter_wildcards=False) 69 | 70 | f = ParamFilter() 71 | f.add_filter('package_name', list(), allow_none=False) 72 | cls._query_problems_filter = f 73 | 74 | def query_problems(self, start_row=None, 75 | rows_per_page=10, 76 | order=-1, 77 | sort_col=None, 78 | filters=None, 79 | **params): 80 | 81 | if not filters: 82 | filters = {} 83 | 84 | if not filters.get('package_name'): 85 | raise HTTPBadRequest('"package_name" is a required filter.') 86 | 87 | package = filters['package_name'] 88 | 89 | url = "https://retrace.fedoraproject.org/faf/problems/?component_names={package}&limit={rows}" 90 | url = url.format(package=package, rows=rows_per_page) 91 | 92 | headers = {'Accept': 'application/json'} 93 | 94 | response = requests.get(url, headers=headers) 95 | 96 | if not bool(response): 97 | raise HTTPBadGateway("Failed to talk to ABRT Analytics, %r %r" % (url, response)) 98 | 99 | data = response.json() 100 | if 'problems' in data: 101 | problems = data['problems'] 102 | else: 103 | raise HTTPBadGateway("Got unexpected response from ABRT Analytics.") 104 | 105 | return (len(problems), problems) 106 | -------------------------------------------------------------------------------- /tests/cassettes/test_Indexer_latest_active.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept-Encoding: ['gzip, deflate'] 6 | Connection: [keep-alive] 7 | Cookie: [SERVERID=pdc-web01] 8 | User-Agent: [python-requests/2.18.4] 9 | accept: [application/json] 10 | content-type: [application/json] 11 | method: GET 12 | uri: https://pdc.fedoraproject.org/rest_api/v1/component-branches/?active=True&type=rpm&global_component=guake&page_size=100&page=1 13 | response: 14 | body: 15 | string: !!binary | 16 | H4sIAAAAAAAAA6WT3Y7CIBCF34XrNgFaoPVVNsZgHZUsbQkFf2J89x3d1O5G0zbKFUPmgzlnmAup 17 | 2tgEshAJaeCEmyZamxDn4WDa2PWxhy7agOHXhZgNWShZSpmQnW3X2q6qtnZtA7d7yC7qbyB4m64B 18 | Q7ASg87qgWUiK0p+P8SELui1hZV2BvOgtXjEKacpY2lGyTUZmII9GKiiN+G82poTdFOcynpuHXcj 19 | yDIh4exuRXtXY4augjlgGHyEhFT4oKlQrNNhTxZbbTvoX1GKKj7LDQdWPfuRMyrG/chTKv/rymkp 20 | pv14xRVi1I8H8okfTM7yY8tf/I6cKzWpjBUpVSllf5VxqcaUDcj7yjJeiKycJ+2p0VL8Ts1oifgZ 21 | ef5QdUem+zxwHzRNFsWska51F8C/mGrFaV+p18e92cBQIi60/l33l9cfzigTzqkEAAA= 22 | headers: 23 | allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] 24 | appserver: [proxy12.fedoraproject.org] 25 | apptime: [D=278077] 26 | cache-control: ['private, max-age=0, must-revalidate'] 27 | connection: [Keep-Alive] 28 | content-encoding: [gzip] 29 | content-length: ['335'] 30 | content-type: [application/json] 31 | date: ['Fri, 09 Feb 2018 10:00:16 GMT'] 32 | keep-alive: ['timeout=15, max=500'] 33 | referrer-policy: [same-origin] 34 | server: [Apache/2.4.6 (Red Hat Enterprise Linux) mod_wsgi/3.4 Python/2.7.5] 35 | strict-transport-security: [max-age=15768000; includeSubDomains; preload] 36 | vary: ['Accept,Cookie,Accept-Encoding'] 37 | x-content-type-options: [nosniff] 38 | x-frame-options: [SAMEORIGIN, SAMEORIGIN] 39 | x-xss-protection: [1; mode=block] 40 | status: {code: 200, message: OK} 41 | - request: 42 | body: null 43 | headers: 44 | Accept-Encoding: ['gzip, deflate'] 45 | Connection: [keep-alive] 46 | Cookie: [SERVERID=pdc-web01] 47 | User-Agent: [python-requests/2.18.4] 48 | accept: [application/json] 49 | content-type: [application/json] 50 | method: GET 51 | uri: https://pdc.fedoraproject.org/rest_api/v1/component-branches/?active=True&type=rpm&global_component=chromium&page_size=100&page=1 52 | response: 53 | body: 54 | string: !!binary | 55 | H4sIAAAAAAAAA6WR3YrCMBCF32WuW0jSmu76KotIGqcaSJuQH1cR332nQu3CihU3V5khZzLfORfQ 56 | Lg8J1nUBA57oMmRrC/ABj8blONUBY7aJyq8LmB2suWgYK2BvXavsVrveuwHHOaAPwfUm90ADVY/U 57 | QY+2oTJaNQ8Qq7oWtx69iEm1FrfKG3qGzlJLMFGXTJYVg2sxS/hdgjoHk87bzpwwLsiqZpK1ef9E 58 | sSkgnf24c/AjgNLJHKlMIWMBmv4zmnC9SgdYd8pGnD4hP7h40Y9OyAduSLmIxj9K1pSM/0aT9TO0 59 | WfE+WiVWYjTwRbY/ScsVq6RY2JLzUtR3rptkOepZ95/g5OercL2KCcOD7Kpq2jWo74PZ4bwkHfL/ 60 | 3Qg21x+OkdBnoQMAAA== 61 | headers: 62 | allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] 63 | appserver: [proxy12.fedoraproject.org] 64 | apptime: [D=212775] 65 | cache-control: ['private, max-age=0, must-revalidate'] 66 | connection: [Keep-Alive] 67 | content-encoding: [gzip] 68 | content-length: ['298'] 69 | content-type: [application/json] 70 | date: ['Fri, 09 Feb 2018 10:00:16 GMT'] 71 | keep-alive: ['timeout=15, max=499'] 72 | referrer-policy: [same-origin] 73 | server: [Apache/2.4.6 (Red Hat Enterprise Linux) mod_wsgi/3.4 Python/2.7.5] 74 | strict-transport-security: [max-age=15768000; includeSubDomains; preload] 75 | vary: ['Accept,Cookie,Accept-Encoding'] 76 | x-content-type-options: [nosniff] 77 | x-frame-options: [SAMEORIGIN, SAMEORIGIN] 78 | x-xss-protection: [1; mode=block] 79 | status: {code: 200, message: OK} 80 | version: 1 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **fedora-packages** allows to search for packages in Fedora. 2 | 3 | ## Documentation 4 | Would be nice to have a bit more documentation. 5 | 6 | ### Hacking with docker-compose 7 | 8 | We have a `docker-compose` setup for hacking on the fedora-packages app. 9 | This setup matches the production deployment of fedora-packages (i.e. 10 | Apache HTTP server with `mod_wsgi`) that is split over several Ansible 11 | files in Fedora infrastructure repository. 12 | 13 | * https://infrastructure.fedoraproject.org/cgit/ansible.git/tree/playbooks/groups/packages.yml 14 | * https://infrastructure.fedoraproject.org/cgit/ansible.git/tree/roles/packages3/web 15 | 16 | To bring the environment up you should first install the following. 17 | 18 | $ sudo dnf install docker-compose 19 | 20 | And then make sure that the docker daemon is running. 21 | 22 | $ sudo systemctl start docker 23 | $ sudo systemctl enable docker 24 | 25 | If you do not wish to run docker-compose using `sudo` you will need to add 26 | your user to the docker group as follow. 27 | 28 | $ sudo groupadd docker && sudo gpasswd -a $USER docker 29 | $ MYGRP=$(id -g) ; newgrp docker ; newgrp $MYGRP 30 | 31 | This is has for effect to give root permission to users added to the docker 32 | group. 33 | 34 | Now from the devel directory you can run docker-compose. 35 | 36 | $ cd devel 37 | $ docker-compose up 38 | 39 | The first time you execute this command, it will build a docker container and it will 40 | take few minutes. Once the build is finish and the application is started you can access 41 | the fedora-packages using this url http://127.0.0.1/packages 42 | 43 | #### Reloading the application after code changes 44 | Since we are using apache HTTP server to serve the application we need to run the following 45 | command to reload the application to test some code changes. 46 | 47 | $ cd devel 48 | $ docker-compose exec web touch /usr/share/fedoracommunity/fedora-packages.wsgi 49 | 50 | This will change the timestamp of the .wsgi file and ask apache to reload the application. 51 | 52 | #### Running the unit tests 53 | To execute the test suite simply run the following command 54 | 55 | $ docker-compose exec web py.test /usr/share/fedoracommunity/tests 56 | 57 | 58 | ### Hacking with Vagrant 59 | 60 | We have a simple vagrant setup for hacking on the fedora-packages app. 61 | 62 | First, install Ansible, Vagrant, the vagrant-sshfs plugin, and the 63 | vagrant-libvirt plugin from the official Fedora repos: 64 | 65 | $ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs 66 | 67 | Now, from within main directory (the one with the Vagrantfile in it) 68 | of your git checkout of fedora-pacakges, run the vagrant up command to provision 69 | your dev environment: 70 | 71 | $ vagrant up 72 | 73 | When this command is completed (it may take a while) you will be able to 74 | ssh into your dev VM with vagrant ssh and then run the command to start the fedora-packages server: 75 | 76 | $ vagrant ssh 77 | [vagrant@localhost ~]$ pushd /vagrant/; gearbox serve; 78 | 79 | Once that is running, simply go to http://localhost:8080/ in your browser on 80 | your host to see your running fedora-packages test instance. 81 | 82 | 83 | ## Create a new release. 84 | 85 | To create a new release, you need to update `setup.py` and `fedora-packages.spec` 86 | with the new version number and any dependencies added or removed. 87 | 88 | The `CHANGELOG.rst` needs also to be updated with the commits and pull-requests 89 | included in the release. 90 | 91 | Once these 3 files have been updated and commited to the develop branch, you create a new 92 | Git tag. 93 | 94 | $ git tag -a 4.1.0 -s -m 'Release 4.1.0' 95 | $ git push && git push --tag 96 | 97 | Once the tag has been successfully pushed, a new release will be available in github. 98 | 99 | ## License 100 | fedora-packages is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3.0. See COPYING included with the distribution for details. 101 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/templates/details.mak: -------------------------------------------------------------------------------- 1 | <% import tg %> 2 |
3 |
4 |
5 |

${w.description}

6 |
7 |
8 |

Active Releases Overview

9 |
${w.children[0].display(package_name=w.package_info['name'])}
10 |
11 | <% 12 | homepage = w.package_info.get('upstream_url', 'Unknown') 13 | %> 14 | 15 |
16 |

Recent History

17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | % if homepage: 26 |
27 |

Upstream

28 | ${homepage} 29 |
30 | % endif 31 | 32 |
33 |

Package Tree

34 | 43 |
44 |
45 |

Point of Contact

46 | % if w.package_info.get('devel_owner', None): 47 | % if w.package_info['devel_owner'].endswith('-maint'): 48 | 49 | % else: 50 | 51 | % endif 52 | % else: 53 |
Orphaned Rawhide
54 | % endif 55 |
56 |
57 |

Latest Build

58 |
${w.latest_build}
59 |
60 |
61 | 108 | -------------------------------------------------------------------------------- /fedoracommunity/controllers/root.py: -------------------------------------------------------------------------------- 1 | # This file is part of Fedora Community. 2 | # Copyright (C) 2008-2010 Red Hat, Inc. 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU Affero General Public License as 6 | # published by the Free Software Foundation, either version 3 of the 7 | # License, or (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU Affero General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Affero General Public License 15 | # along with this program. If not, see . 16 | 17 | # The fedoracommunity moksha app root controller is our root controller 18 | 19 | from tg import expose, tmpl_context, redirect, flash, url, request, override_template, TGController 20 | 21 | import urllib 22 | 23 | import moksha.common.utils 24 | from moksha.wsgi.ext.turbogears import global_resources 25 | 26 | from tw2.jquery import jquery_js 27 | 28 | from fedoracommunity.widgets.search import XapianSearchGrid 29 | from fedoracommunity.widgets.package import PackageWidget 30 | from fedoracommunity.connectors.widgets import fcomm_js 31 | 32 | 33 | class BaseController(TGController): 34 | """ Extend the TG base controller to inject fcomm_js and moksha globs. """ 35 | 36 | def __call__(self, environ, start_response): 37 | fcomm_js.inject() 38 | tmpl_context.moksha_global_resources = global_resources 39 | return super(BaseController, self).__call__(environ, start_response) 40 | 41 | 42 | class RootController(BaseController): 43 | 44 | @expose('mako:fedoracommunity.templates.error') 45 | def error(self, *args, **kw): 46 | jquery_js.display() 47 | resp = request.environ.get('pylons.original_response') 48 | return dict(prefix=request.environ.get('SCRIPT_NAME', ''), 49 | code=str(request.params.get('code', 50 | getattr(resp, 'status_int', 404))), 51 | message=request.params.get('message', 52 | getattr(resp, 'body', 'Not Found'))) 53 | 54 | @expose('mako:fedoracommunity.templates.search') 55 | def index(self, ec = None, **kwds): 56 | '''We show search page by default''' 57 | return self.s(**kwds) 58 | 59 | @expose('mako:fedoracommunity.templates.search') 60 | def s(self, *args, **kwds): 61 | '''Search controller''' 62 | search_str = '' 63 | 64 | if len(args) > 0: 65 | search_str = args[0] 66 | else: 67 | search_str = kwds.get('search', '') 68 | 69 | search_str = urllib.unquote_plus(search_str) 70 | 71 | tmpl_context.widget = XapianSearchGrid 72 | return {'title': 'Fedora Packages Search', 73 | 'options': {'id':'search_grid', 74 | 'filters':{'search':search_str}} 75 | } 76 | 77 | @expose('mako:fedoracommunity.widgets.templates.widget_loader') 78 | def _w(self, widget_name, *args, **kwds): 79 | '''generic widget controller - loads a widget from our widget list 80 | for dynamic loading of sections of the current page''' 81 | return {'widget': moksha.common.utils.get_widget(widget_name), 82 | 'args': list(args), 'kwds': kwds} 83 | 84 | @expose() 85 | def _heartbeat(self, *args, **kwds): 86 | '''Fast heartbeat monitor so proxy servers know if we are runnining''' 87 | # TODO: perhaps we want to monitor our own internal functions and 88 | # send back an error if we are not completely up and running 89 | return "Still running" 90 | 91 | @expose('mako:fedoracommunity.templates.chrome') 92 | def _default(self, *args, **kwds): 93 | '''for anything which does not hit a controller we assume is a package 94 | name''' 95 | package = args[0] 96 | tmpl_context.widget = PackageWidget 97 | return {'title': 'Package %s' % package, 'options':{'args': list(args), 'kwds': kwds}} 98 | 99 | # For older versions of TG2 100 | default = _default 101 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/static/javascript/ui/moksha.ui.popup.js: -------------------------------------------------------------------------------- 1 | // This file is part of Moksha. 2 | // Copyright (C) 2008-2010 Red Hat, Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | /* 17 | * Moksha UI Popup - Popup a block on user interactions such as mouse hover and click. 18 | * Can be used to create popup menus 19 | * 20 | * Copyright (c) 2009 Red Hat, Inc. 21 | * Dual licensed under the MIT 22 | * and GPLv2 licenses. 23 | * 24 | * 25 | * Depends: 26 | * jQuery - ui.core.js 27 | */ 28 | (function ($) { 29 | $.widget("ui.moksha_popup", { 30 | options: { 31 | popupClass: 'ui-moksha-popup', 32 | popupItemsClass: 'ui-moksha-popup-items', 33 | selectedClass: 'ui-moksha-selected', 34 | panelClass: 'ui-moksha-popup-panel', 35 | hoverTimeout: 500, 36 | triggerEvent: 'hover', 37 | fx: null // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } 38 | }, 39 | 40 | _create: function() { 41 | // create popup 42 | this._createpopup(); 43 | }, 44 | 45 | destroy: function() { 46 | 47 | }, 48 | 49 | _popupId: function(e) { 50 | var title = e.attr('panel'); 51 | return title && title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') 52 | || this.options.idPrefix + $.data(e); 53 | }, 54 | 55 | showPopup: function() { 56 | var $e = this.element; 57 | var o = this.options; 58 | this.timer = null; 59 | 60 | $e.children(':first').addClass(o.selectedClass); 61 | if (this.showFx) { 62 | this.$panel.animate(this.showFx, this.showFx.duration || this.baseFx.duration); 63 | } else { 64 | this.$panel.show(); 65 | } 66 | 67 | // fire off a show event 68 | $e.trigger('show'); 69 | 70 | }, 71 | 72 | hidePopup: function() { 73 | var $e = this.element; 74 | var o = this.options; 75 | $e.children(':first').removeClass(o.selectedClass); 76 | if (this.hideFx) { 77 | this.$panel.animate(this.hideFx, this.hideFx.duration || this.baseFx.duration); 78 | } else { 79 | this.$panel.hide(); 80 | } 81 | 82 | $e.trigger('hide'); 83 | }, 84 | 85 | _startHover: function() { 86 | var self = this; 87 | var o = this.options; 88 | moksha.debug('Hover Started'); 89 | this.timer = setTimeout(function () {self.showPopup.apply(self)}, o.hoverTimeout); 90 | }, 91 | 92 | _endHover: function() { 93 | if (this.timer) 94 | clearTimeout(this.timer); 95 | 96 | this.timer = null; 97 | this.hidePopup(); 98 | }, 99 | _createpopup: function() { 100 | var o = this.options; 101 | var $e = this.element; 102 | 103 | this.hover_timer = null; 104 | 105 | if (o.popupClass) { 106 | $e.addClass(o.popupClass); 107 | } 108 | 109 | var popup_id = this._popupId($e); 110 | var $panel = $e.find('#' + popup_id); 111 | if (!$panel.length) { 112 | $panel = $('
').attr('id', popup_id).addClass(o.popupItemsClass); 113 | $e.append($panel); 114 | } 115 | 116 | this.$panel = $panel.addClass(o.panelClass); 117 | this.$panel.hide() 118 | 119 | // set up animations 120 | var hideFx, showFx, baseFx = { 'min-height': 0, duration: 1 }, baseDuration = 'normal'; 121 | if (o.fx && o.fx.constructor == Array) 122 | hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx; 123 | else 124 | hideFx = showFx = o.fx 125 | 126 | this.hideFx = hideFx; 127 | this.showFx = showFx; 128 | this.baseFx = baseFx; 129 | 130 | if (o.triggerEvent == 'click') { 131 | // FIXME: getting click right is hard 132 | } else { 133 | var self = this; 134 | $e.hover(function () {self._startHover.apply(self)}, function () {self._endHover.apply(self)}); 135 | } 136 | 137 | } 138 | }); 139 | 140 | $.extend($.ui.moksha_popup, { 141 | version: '@VERSION' 142 | }); 143 | 144 | 145 | })(jQuery); 146 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/static/javascript/jquery.expander.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Expander Plugin v1.4 3 | * 4 | * Date: Sun Dec 11 15:08:42 2011 EST 5 | * Requires: jQuery v1.3+ 6 | * 7 | * Copyright 2011, Karl Swedberg 8 | * Dual licensed under the MIT and GPL licenses (just like jQuery): 9 | * http://www.opensource.org/licenses/mit-license.php 10 | * http://www.gnu.org/licenses/gpl.html 11 | * 12 | * 13 | * 14 | * 15 | */ 16 | (function(d){d.expander={version:"1.4",defaults:{slicePoint:100,preserveWords:true,widow:4,expandText:"read more",expandPrefix:"… ",expandAfterSummary:false,summaryClass:"summary",detailClass:"details",moreClass:"read-more",lessClass:"read-less",collapseTimer:0,expandEffect:"fadeIn",expandSpeed:250,collapseEffect:"fadeOut",collapseSpeed:200,userCollapse:true,userCollapseText:"read less",userCollapsePrefix:" ",onSlice:null,beforeExpand:null,afterExpand:null,onCollapse:null}};d.fn.expander=function(k){function H(a, 17 | c){var g="span",h=a.summary;if(c){g="div";if(w.test(h)&&!a.expandAfterSummary)h=h.replace(w,a.moreLabel+"$1");else h+=a.moreLabel;h='
'+h+"
"}else h+=a.moreLabel;return[h,"<",g+' class="'+a.detailClass+'"',">",a.details,""].join("")}function I(a){var c=''+a.expandPrefix;c+=''+a.expandText+"";return c}function x(a,c){if(a.lastIndexOf("<")>a.lastIndexOf(">"))a=a.slice(0,a.lastIndexOf("<"));if(c)a=a.replace(J, 18 | "");return a}function y(a,c){c.stop(true,true)[a.collapseEffect](a.collapseSpeed,function(){c.prev("span."+a.moreClass).show().length||c.parent().children("div."+a.summaryClass).show().find("span."+a.moreClass).show()})}function K(a,c,g){if(a.collapseTimer)z=setTimeout(function(){y(a,c);d.isFunction(a.onCollapse)&&a.onCollapse.call(g,false)},a.collapseTimer)}var u="init";if(typeof k=="string"){u=k;k={}}var r=d.extend({},d.expander.defaults,k),L=/^<(?:area|br|col|embed|hr|img|input|link|meta|param).*>$/i, 19 | J=/(&(?:[^;]+;)?|\w+)$/,M=/<\/?(\w+)[^>]*>/g,A=/<(\w+)[^>]*>/g,B=/<\/(\w+)>/g,w=/(<\/[^>]+>)\s*$/,N=/^<[^>]+>.?/,z;k={init:function(){this.each(function(){var a,c,g,h,l,n,v,C=[],s=[],o={},p=this,f=d(this),D=d([]),b=d.meta?d.extend({},r,f.data()):r,O=!!f.find("."+b.detailClass).length,q=!!f.find("*").filter(function(){return/^block|table|list/.test(d(this).css("display"))}).length,t=(q?"div":"span")+"."+b.detailClass,E="span."+b.moreClass,P=b.expandSpeed||0,m=d.trim(f.html());d.trim(f.text());var e= 20 | m.slice(0,b.slicePoint);if(!d.data(this,"expander")){d.data(this,"expander",true);d.each(["onSlice","beforeExpand","afterExpand","onCollapse"],function(i,j){o[j]=d.isFunction(b[j])});e=x(e);for(summTagless=e.replace(M,"").length;summTagless")}else l.splice(G,1)});s.reverse();if(O){c=f.find(t).remove().html();e=f.html();m=e+c;a=""}else{c=m.slice(e.length);if(c===""||c.split(/\s+/).length'+b.userCollapsePrefix+''+b.userCollapseText+"");f.find("span."+ 23 | b.lessClass+" a").unbind("click.expander").bind("click.expander",function(i){i.preventDefault();clearTimeout(z);i=d(this).closest(t);y(b,i);o.onCollapse&&b.onCollapse.call(p,true)})}})},destroy:function(){if(this.data("expander")){this.removeData("expander");this.each(function(){var a=d(this),c=d.meta?d.extend({},r,a.data()):r,g=a.find("."+c.detailClass).contents();a.find("."+c.moreClass).remove();a.find("."+c.summaryClass).remove();a.find("."+c.detailClass).after(g).remove();a.find("."+c.lessClass).remove()})}}}; 24 | k[u]&&k[u].call(this);return this};d.fn.expander.defaults=d.expander.defaults})(jQuery); 25 | -------------------------------------------------------------------------------- /fedoracommunity/widgets/package/package.py: -------------------------------------------------------------------------------- 1 | import mako 2 | import uuid 3 | import moksha.common.utils 4 | import logging 5 | import tw2.core as twc 6 | import tg 7 | 8 | from fedoracommunity.lib.utils import OrderedDict 9 | 10 | from mako.template import Template 11 | from fedoracommunity.connectors.api import get_connector 12 | 13 | log = logging.getLogger(__name__) 14 | 15 | class TabWidget(twc.Widget): 16 | template="mako:fedoracommunity.widgets.package.templates.tabs" 17 | base_url = twc.Param(default='/') 18 | args = twc.Param(default=None) 19 | kwds = twc.Param(default=None) 20 | tabs = twc.Variable(default=None) 21 | _uuid = twc.Param(default=None) 22 | widget = twc.Variable(default=None) 23 | active_tab = twc.Variable(default=None) 24 | tabs = twc.Variable(default=None) 25 | 26 | default_tab = None 27 | 28 | def __init__(self, *args, **kw): 29 | super(TabWidget, self).__init__(*args, **kw) 30 | self._uuid = str(uuid.uuid4()) 31 | self._expanded_tabs = OrderedDict() 32 | for key, widget_key in self.tabs.items(): 33 | display_name = key 34 | key = key.lower().replace(' ', '_') 35 | self._expanded_tabs[key] = {'display_name': display_name, 36 | 'widget_key': widget_key} 37 | 38 | def prepare(self): 39 | super(TabWidget, self).prepare() 40 | if not self.args: 41 | self.args = [] 42 | if not self.kwds: 43 | self.kwds = {} 44 | 45 | if isinstance(self.args, mako.runtime.Undefined): 46 | self.args = [] 47 | if isinstance(self.kwds, mako.runtime.Undefined): 48 | self.kwds = {} 49 | 50 | if len(self.args) > 0: 51 | active_tab = self.args.pop(0).lower() 52 | else: 53 | active_tab = self.default_tab.lower() 54 | 55 | try: 56 | self.widget = moksha.common.utils.get_widget(self._expanded_tabs[active_tab]['widget_key']) 57 | except KeyError: 58 | self.widget = None 59 | 60 | self.tabs = self._expanded_tabs 61 | self.active_tab = active_tab 62 | 63 | if isinstance(self.base_url, Template): 64 | self.base_url = tg.url(self.base_url.render(**self.__dict__)) 65 | 66 | 67 | class PackageNavWidget(TabWidget): 68 | tabs = OrderedDict([('Overview', 'package_overview'), 69 | ('Builds', 'package_builds'), 70 | ('Updates', 'package_updates'), 71 | ('Bugs', 'package_bugs'), 72 | ('Problems', 'package_problems'), 73 | ('Contents', 'package_contents'), 74 | ('Changelog', 'package_changelog'), 75 | ('Sources', 'package_sources')]) 76 | #('Relationships', 'package_relationships')]) 77 | base_url = Template(text='/${kwds["package_name"]}/'); 78 | default_tab = 'Overview' 79 | args = twc.Param(default=None) 80 | kwds = twc.Param(default=None) 81 | 82 | 83 | class PackageWidget(twc.Widget): 84 | template = "mako:fedoracommunity.widgets.package.templates.package_chrome" 85 | 86 | package_name = twc.Param() 87 | args = twc.Param(default=None) 88 | kwds = twc.Param(default=None) 89 | summary = twc.Variable(default='No summary provided') 90 | description = twc.Variable(default='No description provided') 91 | navigation_widget = PackageNavWidget 92 | 93 | def prepare(self): 94 | name = self.args.pop(0) 95 | self.kwds['package_name'] = name 96 | self.kwds['subpackage_of'] = "" 97 | self.package_name = name 98 | xapian_conn = get_connector('xapian') 99 | result = xapian_conn.get_package_info(name) 100 | self.package_info = result 101 | 102 | super(PackageWidget, self).prepare() 103 | 104 | if not result: 105 | tg.redirect('/s/' + name) 106 | 107 | if result['name'] == name: 108 | self.summary = result['summary'] 109 | self.description = result['description'] 110 | else: 111 | self.kwds['subpackage_of'] = result['name'] 112 | for subpkg in result['sub_pkgs']: 113 | if subpkg['name'] == name: 114 | self.summary = subpkg['summary'] 115 | self.description = subpkg['description'] 116 | break 117 | else: 118 | tg.redirect('/s/' + name) 119 | 120 | def __repr__(self): 121 | return u"" % self.package_name 122 | --------------------------------------------------------------------------------