bodhi/model.py bodhi/overrides.py bodhi/tools
by Luke Macken
bodhi/model.py | 6 ++++++
bodhi/overrides.py | 23 +++++++++++++++++++++--
bodhi/tools/client.py | 27 +++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 2 deletions(-)
New commits:
commit 9d1832d830b73a12a863508384041d9e48ec4161
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Apr 26 15:05:05 2011 -0400
More buildroot override improvements
This adds --buildroot-override and --expire-override bodhi client options.
diff --git a/bodhi/model.py b/bodhi/model.py
index 7746e6f..0e1fab7 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -1442,6 +1442,12 @@ class BuildRootOverride(SQLObject):
self.release.override_tag))
koji.untagBuild(self.release.override_tag, self.build, force=True)
+ def __json__(self):
+ return dict(build=self.build, date_submitted=self.date_submitted,
+ notes=self.notes, expiration=self.expiration,
+ date_expired=self.date_expired, submitter=self.submitter,
+ release=self.release.name)
+
class Releases(Singleton):
""" A cache of frequently used release data.
diff --git a/bodhi/overrides.py b/bodhi/overrides.py
index 706b3e9..2bc9a80 100644
--- a/bodhi/overrides.py
+++ b/bodhi/overrides.py
@@ -18,6 +18,11 @@ from turbogears import (expose, paginate, validate, validators, redirect,
error_handler, url, flash, identity, config)
from turbogears.controllers import Controller
+try:
+ from fedora.tg.tg1utils import request_format
+except ImportError:
+ from fedora.tg.util import request_format
+
from bodhi.model import BuildRootOverride, Release
from bodhi.buildsys import get_session
from bodhi.util import get_nvr, get_pkg_pushers
@@ -62,9 +67,11 @@ class BuildRootOverrideController(Controller):
build, identity.current.user_name))
flash('Buildroot override for %s successful untagged' % build)
override.destroySelf()
+ if request_format() == 'json':
+ return dict()
raise redirect('/override')
- @expose(template="bodhi.templates.search")
+ @expose('json')
@validate(form=override_form)
@error_handler(new)
def save(self, builds, notes, *args, **kw):
@@ -80,7 +87,13 @@ class BuildRootOverrideController(Controller):
# Make sure the build is tagged correctly
koji = get_session()
- tags = [tag['name'] for tag in koji.listTags(build)]
+ try:
+ tags = [tag['name'] for tag in koji.listTags(build)]
+ except Exception, e:
+ flash(str(e))
+ if request_format() == 'json':
+ return dict()
+ raise redirect('/override/new')
# Determine the release by the tag, and sanity check the builds
for tag in tags:
@@ -90,11 +103,15 @@ class BuildRootOverrideController(Controller):
elif tag in (rel.testing_tag, rel.stable_tag):
flash('Error: %s is already tagged with %s' % (
build, tag))
+ if request_format() == 'json':
+ return dict()
raise redirect('/override/new')
if not release:
flash('Error: Could not determine release for %s with tags %s' %
(builds, tags))
+ if request_format() == 'json':
+ return dict()
raise redirect('/override')
# Create a new overrides object
@@ -111,4 +128,6 @@ class BuildRootOverrideController(Controller):
flash('Your buildroot override has been successfully tagged. '
'It may take up to 20 minutes for the buildroot to regenerate.')
+ if request_format() == 'json':
+ return dict(override.__json__())
raise redirect('/override')
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 98578e0..864290c 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -99,6 +99,12 @@ def get_parser():
parser.add_option("", "--untested", action="store_true",
help="Display a list of untested critical path updates",
dest="untested", default=False)
+ parser.add_option("-O", "--buildroot-override", action="store",
+ help="Submit a build as a buildroot override",
+ dest="override", metavar="BUILD")
+ parser.add_option("-E", "--expire-override", action="store",
+ help="Expire a buildroot override",
+ dest="expire_override", metavar="BUILD")
## Details
parser.add_option("-s", "--status", action="store", type="string",
@@ -165,6 +171,8 @@ def main():
log.error("Please specifiy a comma-separated list of builds")
sys.exit(-1)
+ override_notes = None
+
while True:
try:
if opts.new:
@@ -418,6 +426,25 @@ def main():
arch == 'i686' and ' --arch=i386 --arch=i586'
or '', build['nvr']),
shell=True)
+ elif opts.override:
+ if not override_notes:
+ override_notes = raw_input('Notes: ').strip()
+ data = bodhi.send_request('override/save', req_params={
+ 'builds': opts.override,
+ 'notes': override_notes,
+ }, auth=True)
+ if data.get('tg_flash'):
+ log.info(data['tg_flash'])
+ else:
+ log.info("No data returned from bodhi?")
+ elif opts.expire_override:
+ data = bodhi.send_request('override/expire', req_params={
+ 'build': opts.expire_override,
+ }, auth=True)
+ if data.get('tg_flash'):
+ log.info(data['tg_flash'])
+ else:
+ log.info("No data returned from bodhi?")
else:
parser.print_help()
break
13 years
bodhi/config bodhi/mail.py
by Luke Macken
bodhi/config/app.cfg | 3 +++
bodhi/mail.py | 2 ++
2 files changed, 5 insertions(+)
New commits:
commit e285238f2933754a2c78e3e9cc2a1a511de3d378
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 25 14:21:51 2011 -0400
Add the ability to exclude a user from receiving email (eg: autoqa)
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 604aa90..73d8911 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -113,6 +113,9 @@ mail.server = None
mail.debug = False
mail.encoding = 'utf-8-qp'
+# Exclude sending emails to these users
+exclude_mail = 'autoqa'
+
##
## Buildsystem settings
##
diff --git a/bodhi/mail.py b/bodhi/mail.py
index 87b1405..8ac4f72 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -436,6 +436,8 @@ def get_template(update, use_template='fedora_errata_template'):
def send_mail(sender, to, subject, body):
from turbomail import MailNotEnabledException
+ if to in config.get('exclude_mail').split():
+ return
message = turbomail.Message(sender, to, subject)
message.plain = body
try:
13 years
bodhi/overrides.py
by Luke Macken
bodhi/overrides.py | 5 -----
1 file changed, 5 deletions(-)
New commits:
commit 72c2529cd107a4d02c73ced239959d6838caf9ab
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Apr 21 16:45:32 2011 -0400
Remove an unnecessary comment block
diff --git a/bodhi/overrides.py b/bodhi/overrides.py
index cdb11c8..706b3e9 100644
--- a/bodhi/overrides.py
+++ b/bodhi/overrides.py
@@ -86,11 +86,6 @@ class BuildRootOverrideController(Controller):
for tag in tags:
for rel in Release.select():
if tag == rel.candidate_tag:
- #if release and release.name != rel.name:
- # flash('Error: You cannot submit buildroot '
- # 'overrides for more than one release at '
- # 'a time')
- # raise redirect('/override/new')
release = rel
elif tag in (rel.testing_tag, rel.stable_tag):
flash('Error: %s is already tagged with %s' % (
13 years
bodhi/config bodhi/controllers.py bodhi/jobs.py bodhi/mail.py bodhi/masher.py bodhi/model.py bodhi/overrides.py bodhi/templates bodhi/widgets.py
by Luke Macken
bodhi/config/app.cfg | 5 +
bodhi/controllers.py | 2
bodhi/jobs.py | 25 +++++++-
bodhi/mail.py | 16 +++++
bodhi/masher.py | 15 ++++
bodhi/model.py | 29 +++++++++
bodhi/overrides.py | 119 +++++++++++++++++++++++++++++++++++++++
bodhi/templates/master.kid | 1
bodhi/templates/overrideform.kid | 43 ++++++++++++++
bodhi/templates/overrides.kid | 84 +++++++++++++++++++++++++++
bodhi/widgets.py | 13 ++++
11 files changed, 349 insertions(+), 3 deletions(-)
New commits:
commit 357f3d90db427ff69f09b6e5541a40e24dda1f0c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Apr 21 16:28:34 2011 -0400
Initial buildroot override support
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 2c951f4..604aa90 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -214,6 +214,11 @@ not_yet_tested_msg = 'This update has not yet met the minimum testing requiremen
feeds.num_days_to_show = 7
feeds.max_entries = 20
+## Buildroot Override Settings
+
+# Number of days before expiring overrides
+buildroot_overrides.expire_after = 4
+
# VIEW
# which view (template engine) to use if one is not specified in the
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 5f954e3..fb1878f 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -51,6 +51,7 @@ from bodhi.metrics import MetricsController
from bodhi.model import (Package, PackageBuild, PackageUpdate, Release,
Bugzilla, CVE, Comment)
from bodhi.search import SearchController
+from bodhi.overrides import BuildRootOverrideController
from bodhi.widgets import CommentForm, OkCancelForm, CommentCaptchaForm
from bodhi.exceptions import (DuplicateEntryError, InvalidRequest,
PostgresIntegrityError, SQLiteIntegrityError,
@@ -65,6 +66,7 @@ class Root(controllers.RootController):
search = SearchController()
rss = Feed("rss2.0")
metrics = MetricsController()
+ override = BuildRootOverrideController()
comment_form = CommentForm()
comment_captcha_form = CommentCaptchaForm()
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index c5c2a98..4b0bbf3 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -28,7 +28,7 @@ from sqlobject.sqlbuilder import AND
from bodhi import mail
from bodhi.util import get_age_in_days
-from bodhi.model import Release, PackageUpdate
+from bodhi.model import Release, PackageUpdate, BuildRootOverride
log = logging.getLogger(__name__)
@@ -200,6 +200,19 @@ def approve_testing_updates():
log.info('approve_testing_updates job complete.')
+def expire_buildroot_overrides():
+ """ Iterate over all of the buildroot overrides, expiring appropriately """
+ log.info('Running expire_buildroot_overrides job')
+ now = datetime.utcnow()
+ for override in BuildRootOverride.select():
+ if (now - override.expiration).days >= 0:
+ log.info('Automatically expiring buildroot override: %s' %
+ override.builds)
+ override.untag()
+ override.destroySelf()
+ log.info('expire_buildroot_overrides job complete!')
+
+
def schedule():
""" Schedule our periodic tasks """
@@ -253,3 +266,13 @@ def schedule():
interval=21600)
#weekdays=range(1,8),
#timeonday=(0,0))
+
+ # Automatically expire buildroot overrides
+ if 'approve_testing_updates' in jobs:
+ log.debug("Scheduling expire_buildroot_overrides job")
+ scheduler.add_interval_task(action=expire_buildroot_overrides,
+ # Run every 6 hours
+ initialdelay=21600,
+ interval=21600)
+ #weekdays=range(1,8),
+ #timeonday=(0,0))
diff --git a/bodhi/mail.py b/bodhi/mail.py
index f387b58..87b1405 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -253,6 +253,22 @@ The Critical Path update `%(package)s` has been approved.
}
},
+ 'buildroot_override' : {
+ 'body' : u"""\
+%(submitter)s has added %(package)s to the buildroot override tag for %(release)s.
+
+ Notes: %(notes)s
+
+ https://admin.fedoraproject.org/updates/overrides
+
+""",
+ 'fields' : lambda x: {
+ 'package' : x.build,
+ 'submitter' : identity.current.user_name,
+ 'release' : x.release.long_name,
+ 'notes' : x.notes,
+ }
+ },
}
fedora_errata_template = u"""\
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 0340b21..3247df9 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -31,7 +31,7 @@ from time import sleep
from bodhi import buildsys, mail
from bodhi.util import synchronized, sanity_check_repodata
-from bodhi.model import PackageUpdate, Release
+from bodhi.model import PackageUpdate, Release, BuildRootOverride
from bodhi.metadata import ExtendedMetadata
from bodhi.exceptions import MashTaskException
@@ -473,6 +473,18 @@ class MashTask(Thread):
update.remove_tag(update.release.pending_testing_tag, koji=self.koji)
self.koji.multiCall()
+ def obsolete_buildroot_overrides(self):
+ """ Obsolete any buildroot overrides that are in this push """
+ for update in self.updates:
+ for build in update.builds:
+ try:
+ override = BuildRootOverride.byBuild(build.nvr)
+ log.info('Expiring buildroot override: %s' % build.nvr)
+ override.untag()
+ override.destroySelf()
+ except SQLObjectNotFound:
+ pass
+
# With a large pushes, this tends to cause much buildsystem churn, as well
# as polluting the tag history.
#def undo_move(self):
@@ -676,6 +688,7 @@ class MashTask(Thread):
# Move koji build tags
if not self.resume and len(self.updates):
self.move_builds()
+ self.obsolete_buildroot_overrides()
# Remove all pending tags
# TODO: Once AutoQA is Good To Go, then we'll want to prevent
diff --git a/bodhi/model.py b/bodhi/model.py
index 576b27f..7746e6f 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -49,7 +49,7 @@ hub = PackageHub("bodhi")
__connection__ = hub
soClasses=('Release', 'Package', 'PackageBuild', 'PackageUpdate', 'CVE',
- 'Bugzilla', 'Comment', 'User', 'Group', 'Visit')
+ 'Bugzilla', 'Comment', 'User', 'Group', 'Visit', 'BuildRootOverride')
class Release(SQLObject):
@@ -107,6 +107,10 @@ class Release(SQLObject):
return self.stable_tag + '-pending'
@property
+ def override_tag(self):
+ return '%s-override' % self.dist_tag
+
+ @property
def stable_repo(self):
id = self.name.replace('-', '').lower()
if self.name.startswith('EL'): # EPEL Hack.
@@ -1416,6 +1420,29 @@ class Bugzilla(SQLObject):
return "https://bugzilla.redhat.com/show_bug.cgi?id=%s" % self.bz_id
+class BuildRootOverride(SQLObject):
+ build = UnicodeCol(alternateID=True, notNone=True)
+ date_submitted = DateTimeCol(default=datetime.utcnow, notNone=True)
+ notes = UnicodeCol()
+ expiration = DateTimeCol(default=None)
+ date_expired = DateTimeCol(default=None)
+ submitter = UnicodeCol(notNone=True)
+ release = ForeignKey('Release')
+
+ def tag(self):
+ koji = buildsys.get_session()
+ log.debug('Tagging %s with %s' % (self.build,
+ self.release.override_tag))
+ koji.tagBuild(self.release.override_tag, self.build, force=True)
+ mail.send_admin('buildroot_override', self)
+
+ def untag(self):
+ koji = buildsys.get_session()
+ log.debug('Untagging %s with %s' % (self.build,
+ self.release.override_tag))
+ koji.untagBuild(self.release.override_tag, self.build, force=True)
+
+
class Releases(Singleton):
""" A cache of frequently used release data.
diff --git a/bodhi/overrides.py b/bodhi/overrides.py
new file mode 100644
index 0000000..cdb11c8
--- /dev/null
+++ b/bodhi/overrides.py
@@ -0,0 +1,119 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import logging
+
+from datetime import datetime, timedelta
+from turbogears import (expose, paginate, validate, validators, redirect,
+ error_handler, url, flash, identity, config)
+from turbogears.controllers import Controller
+
+from bodhi.model import BuildRootOverride, Release
+from bodhi.buildsys import get_session
+from bodhi.util import get_nvr, get_pkg_pushers
+from bodhi.widgets import BuildRootOverrideForm
+
+log = logging.getLogger(__name__)
+
+override_form = BuildRootOverrideForm()
+
+class BuildRootOverrideController(Controller):
+ require = identity.not_anonymous()
+
+ @expose(template="bodhi.templates.overrides")
+ @paginate('overrides', default_order='-date_submitted',
+ limit=20, max_limit=1000)
+ def index(self, build=None, tg_errors=None, *args, **kw):
+ overrides = BuildRootOverride.select()
+ return dict(overrides=overrides, title='Buildroot Overrides',
+ num_items=overrides.count())
+
+ @expose(template="bodhi.templates.form")
+ def new(self, build=None, tg_errors=None, *args, **kw):
+ if tg_errors:
+ flash(tg_errors)
+ if build:
+ log.debug('redirecting!')
+ raise redirect('/override/%s' % build)
+ return dict(form=override_form, values={}, action=url('/override/save'),
+ title='Buildroot Overrides')
+
+ @expose(allow_json=True)
+ def expire(self, build, *args, **kw):
+ """ Expire a given override """
+ override = BuildRootOverride.byBuild(build)
+ try:
+ override.untag()
+ except Exception, e:
+ log.error(str(e))
+ flash(str(e))
+ raise redirect('/override')
+ log.info('Buildroot override %s manually expired by %s' % (
+ build, identity.current.user_name))
+ flash('Buildroot override for %s successful untagged' % build)
+ override.destroySelf()
+ raise redirect('/override')
+
+ @expose(template="bodhi.templates.search")
+ @validate(form=override_form)
+ @error_handler(new)
+ def save(self, builds, notes, *args, **kw):
+ log.debug('BuildRootOverrideController.save(%s)' % builds)
+ for build in builds:
+ release = None
+ n, v, r = get_nvr(build)
+
+ # Make sure the user has commit rights
+ people, groups = get_pkg_pushers(n)
+ if identity.current.user_name not in people[0]:
+ flash("Error: You do not have commit privileges to %s" % n)
+
+ # Make sure the build is tagged correctly
+ koji = get_session()
+ tags = [tag['name'] for tag in koji.listTags(build)]
+
+ # Determine the release by the tag, and sanity check the builds
+ for tag in tags:
+ for rel in Release.select():
+ if tag == rel.candidate_tag:
+ #if release and release.name != rel.name:
+ # flash('Error: You cannot submit buildroot '
+ # 'overrides for more than one release at '
+ # 'a time')
+ # raise redirect('/override/new')
+ release = rel
+ elif tag in (rel.testing_tag, rel.stable_tag):
+ flash('Error: %s is already tagged with %s' % (
+ build, tag))
+ raise redirect('/override/new')
+
+ if not release:
+ flash('Error: Could not determine release for %s with tags %s' %
+ (builds, tags))
+ raise redirect('/override')
+
+ # Create a new overrides object
+ override = BuildRootOverride(build=build,
+ notes=notes, submitter=identity.current.user_name,
+ releaseID=release.id)
+
+ now = datetime.utcnow()
+ override.expiration = now + \
+ timedelta(days=config.get('buildroot_overrides.expire_after'))
+
+ # Tag the build
+ override.tag()
+
+ flash('Your buildroot override has been successfully tagged. '
+ 'It may take up to 20 minutes for the buildroot to regenerate.')
+ raise redirect('/override')
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index 09cee33..7133ef9 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -93,6 +93,7 @@ $(document).ready(function() {
<li><a href="${tg.url('/')}">${tg.identity.anonymous and ' ' or "%s's " % tg.identity.user_name}Home</a></li>
<li py:if="not tg.identity.anonymous"><a href="${tg.url('/mine')}">My Updates (${PackageUpdate.select(PackageUpdate.q.submitter == tg.identity.user_name).count()})</a></li>
<li py:if="not tg.identity.anonymous"><a href="${tg.url('/new/')}">New Update</a></li>
+ <li py:if="not tg.identity.anonymous"><a href="${tg.url('/override/')}">Buildroot Overrides</a></li>
<li py:for="release in Releases().data">
<a id="${release['name']}" href="${tg.url('/%s' % release['name'])}">${release['long_name']}</a>
<div id="${release['name']}_releases">
diff --git a/bodhi/templates/overrideform.kid b/bodhi/templates/overrideform.kid
new file mode 100644
index 0000000..c9ee2ec
--- /dev/null
+++ b/bodhi/templates/overrideform.kid
@@ -0,0 +1,43 @@
+<form xmlns:py="http://purl.org/kid/ns#"
+ name="${name}"
+ action="${action}"
+ method="${method}"
+ py:attrs="form_attrs" width="100%">
+
+ <h2>Buildroot Override Form</h2>
+
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr py:for="i, field in enumerate(fields)">
+ <td class="title">
+ <label class="fieldlabel"
+ for="${field.field_id}"
+ py:content="field.label"/>
+ </td>
+ <td class="value">
+ <font color="red">
+ <span py:if="error_for(field)"
+ class="fielderror"
+ py:content="error_for(field)" />
+ </font>
+ <span py:replace="field.display(value_for(field), **params_for(field))"/>
+ <span py:if="field.help_text"
+ class="fieldhelp"
+ py:content="field.help_text" />
+ </td>
+ </tr>
+ <tr>
+ <td class="title" />
+ <td class="value" py:content="submit.display(submit_text)" />
+ </tr>
+ </table>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#addField").click( function() {
+ o = $("input[@id=form_builds_text]:eq(0)");
+ o.clone().val(" "+o.val()).insertAfter(o.parent().parent()).show();
+ o.focus().val("");
+ } );
+ });
+ </script>
+</form>
diff --git a/bodhi/templates/overrides.kid b/bodhi/templates/overrides.kid
new file mode 100644
index 0000000..887d5df
--- /dev/null
+++ b/bodhi/templates/overrides.kid
@@ -0,0 +1,84 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Fedora Updates - ${title}</title>
+</head>
+
+<body>
+ <h2>${title}</h2>
+ <a href="${tg.url('/override/new')}"><img src="${tg.url('/static/images/plus.png')}"/>Submit a new override</a>
+ <br/>
+ <div py:if="num_items" class="list">
+ <span py:for="page in tg.paginate.pages">
+ <a py:if="page != tg.paginate.current_page"
+ href="${tg.paginate.get_href(page)}">${page}</a>
+ <b py:if="page == tg.paginate.current_page">${page}</b>
+ </span>
+ </div>
+
+ <table class="list">
+ <tr class="list">
+ <th class="list">
+ <b>Build</b>
+ </th>
+ <th class="list">
+ <b>Release</b>
+ </th>
+ <th class="list">
+ <b>Notes</b>
+ </th>
+ <th class="list">
+ <b>Submitted</b>
+ </th>
+ <th class="list">
+ <b>Submitter</b>
+ </th>
+ <th class="list">
+ <b>Expiration</b>
+ </th>
+ <th class="list">
+ <b>Manual Expiration</b>
+ </th>
+ </tr>
+ <?python row_color = "#FFFFFF" ?>
+ <tr class="list" bgcolor="${row_color}" py:for="override in overrides">
+ <td class="list">
+ ${override.build}
+ </td>
+ <td class="list">
+ <a class="list" href="${tg.url('/%s' % override.release.name)}">${override.release.name}</a>
+ </td>
+ <td class="list">
+ ${override.notes}
+ </td>
+ <td class="list">
+ ${override.date_submitted}
+ </td>
+ <td class="list">
+ <a href="${tg.url('/user/' + override.submitter)}">${override.submitter}</a>
+ </td>
+ <td class="list">
+ ${override.expiration}
+ </td>
+ <td class="list">
+ <div py:if="'releng' in tg.identity.groups or tg.identity.user_name == override.submitter">
+ <a href="${tg.url('/override/expire/%s' % override.build)}">Expire</a>
+ </div>
+ </td>
+ <?python row_color = (row_color == "#f1f1f1") and "#FFFFFF" or "#f1f1f1" ?>
+ </tr>
+ </table>
+
+ <div py:if="num_items" class="list">
+ <span py:for="page in tg.paginate.pages">
+ <a py:if="page != tg.paginate.current_page"
+ href="${tg.paginate.get_href(page)}">${page}</a>
+ <b py:if="page == tg.paginate.current_page">${page}</b>
+ </span>
+ </div>
+
+</body>
+</html>
diff --git a/bodhi/widgets.py b/bodhi/widgets.py
index eb9c70e..3f294f1 100644
--- a/bodhi/widgets.py
+++ b/bodhi/widgets.py
@@ -192,3 +192,16 @@ class SortableDataGrid(DataGrid):
javascript = [LocalJSLink('bodhi', '/static/js/jquery.js'),
LocalJSLink('bodhi', '/static/js/jquery.tablesorter.js')]
css = [LocalCSSLink('bodhi', '/static/css/flora.tablesorter.css')]
+
+class BuildRootOverrideForm(Form):
+ template = "bodhi.templates.overrideform"
+ fields = [
+ AutoCompleteField('builds', label='Build',
+ search_controller=url('/new/search'),
+ search_param='name', result_name='pkgs',
+ template='bodhi.templates.packagefield',
+ validator=AutoCompleteValidator()),
+ TextArea('notes', validator=validators.UnicodeString(),
+ rows=13, cols=65),
+ ]
+ submit_text = "Submit"
13 years
bodhi/templates
by Luke Macken
bodhi/templates/captchacommentform.kid | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit dd8d77dc5f2f934973fd21f0163977c79965ce28
Author: Christopher Aillon <caillon(a)redhat.com>
Date: Sun Apr 17 13:59:22 2011 -0700
Remind the user to log in before submitting a comment
diff --git a/bodhi/templates/captchacommentform.kid b/bodhi/templates/captchacommentform.kid
index b6496cf..d1f1f8e 100644
--- a/bodhi/templates/captchacommentform.kid
+++ b/bodhi/templates/captchacommentform.kid
@@ -10,6 +10,11 @@
<table cellpadding="0" cellspacing="0" width="45%">
<tr>
<td colspan="3">
+ Tip: <a href="${tg.url('/login')}">Login</a> to impact how quickly this update gets pushed or unpushed.
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
${display_field_for("author")}
</td>
</tr>
13 years
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 8efdf4c5df528123950e46752791b50db4eb5ca5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 11 15:03:14 2011 -0400
Fix a typo in the last patch
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 05963b0..5f954e3 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -716,10 +716,10 @@ class Root(controllers.RootController):
try:
if edited.request == 'testing':
koji.tagBuild(edited.release.pending_testing_tag,
- build.nvr, force=True)
+ build, force=True)
elif edited.request == 'stable':
koji.tagBuild(edited.release.pending_stable_tag,
- build.nvr, force=True)
+ build, force=True)
except TagError, e:
log.exception(e)
13 years
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 955322be3e26f9aa03c6cbb0d104e5061d72abe4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 11 14:43:35 2011 -0400
Add the appropriate pending tag when adding a build to an existing update.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 725cc44..05963b0 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -711,6 +711,18 @@ class Root(controllers.RootController):
for build in builds:
if build not in edited_builds:
new_builds.append(build)
+
+ # Add the appropriate pending tags
+ try:
+ if edited.request == 'testing':
+ koji.tagBuild(edited.release.pending_testing_tag,
+ build.nvr, force=True)
+ elif edited.request == 'stable':
+ koji.tagBuild(edited.release.pending_stable_tag,
+ build.nvr, force=True)
+ except TagError, e:
+ log.exception(e)
+
for build in edited_builds:
if build not in builds:
removed_builds.append(build)
13 years
2 commits - bodhi/config bodhi/metadata.py bodhi/static bodhi/templates
by Luke Macken
bodhi/config/app.cfg | 3
bodhi/metadata.py | 57 +++---
bodhi/static/css/layout.css | 418 ++++++++++++++++++++------------------------
bodhi/templates/login.kid | 25 --
bodhi/templates/metrics.kid | 1
bodhi/templates/new.kid | 1
bodhi/templates/pkg.kid | 7
bodhi/templates/show.kid | 6
bodhi/templates/welcome.kid | 6
9 files changed, 251 insertions(+), 273 deletions(-)
New commits:
commit 5e5d0b21e13e4f529776d1408c764a9bf2c2e4fc
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Apr 6 14:56:09 2011 -0400
Apply a patch from Corey Maynard to make our Koji urls configurable.
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 6cd2684..2c951f4 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -128,6 +128,9 @@ build_dir = '%(top_level_dir)s/../packages'
# Koji's XML-RPC hub
koji_hub = 'https://koji.fedoraproject.org/kojihub'
+# Root url of the Koji instance to point to. No trailing slash
+koji_url = "http://koji.fedoraproject.org"
+
# Koji certs
client_cert = None
clientca_cert = None
diff --git a/bodhi/templates/pkg.kid b/bodhi/templates/pkg.kid
index 96fda69..af142af 100644
--- a/bodhi/templates/pkg.kid
+++ b/bodhi/templates/pkg.kid
@@ -8,6 +8,11 @@
py:replace="''"/>
<title>${pkg.name}</title>
</head>
+<?python
+from turbogears import config
+
+koji_url = config.get('koji_url')
+?>
<body>
@@ -32,7 +37,7 @@
</li>
<li>
<img src="https://fedoraproject.org/static/images/icons/fedora-infra-icon_koji.png"/>
- <a href="http://koji.fedoraproject.org/koji/search?terms=${pkg.name}&type=pack...">Koji Buildsystem</a>
+ <a href="${koji_url}/koji/search?terms=${pkg.name}&type=package&match=glob">Koji Buildsystem</a>
</li>
<li>
<img src="https://fedoraproject.org/static/css/../images/icons/fedora-infra-icon_so..."/>
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 458f082..d98cd12 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -17,15 +17,17 @@
<?python
from cgi import escape
from bodhi import util
-from turbogears import identity
+from turbogears import identity, config
from markdown import markdown
import re
+koji_url = config.get('koji_url')
+
## Link to build info and logs
buildinfo = ''
for build in update.builds:
nvr = util.get_nvr(build.nvr)
- buildinfo += '<a href="http://koji.fedoraproject.org/koji/search?terms=%s&type=build&mat...">%s</a> (<a href="http://koji.fedoraproject.org/packages/%s/%s/%s/data/logs">logs</a>)<br/>' % (build.nvr, build.nvr, nvr[0], nvr[1], nvr[2])
+ buildinfo += '<a href="%s/koji/search?terms=%s&type=build&match=glob">%s</a> (<a href="%s/packages/%s/%s/%s/data/logs">logs</a>)<br/>' % (koji_url, build.nvr, build.nvr, koji_url, nvr[0], nvr[1], nvr[2])
## Make the package name linkable in the n-v-r
title = ''
diff --git a/bodhi/templates/welcome.kid b/bodhi/templates/welcome.kid
index 0ebed19..a6530f5 100644
--- a/bodhi/templates/welcome.kid
+++ b/bodhi/templates/welcome.kid
@@ -25,6 +25,10 @@
</script>
</head>
+<?python
+from turbogears import config
+koji_url = config.get('koji_url')
+?>
<body>
<table width="90%" align="center" valign="top">
<tr>
@@ -65,7 +69,7 @@
</td>
<td>
<span id="kojitip" title="Koji Buildsystem">
- <a href="http://koji.fedoraproject.org/koji/" class="list"><font size="6">麹</font></a>
+ <a href="${koji_url}/koji/" class="list"><font size="6">麹</font></a>
</span>
</td>
</tr>
commit b9a785bf913fa474e260b3853a3391c4e5eb8695
Author: Corey Maynard <me(a)coreymaynard.com>
Date: Wed Apr 6 09:17:42 2011 -0400
This patch makes the check for the package tags optional, by either making the URL an empty string or None in app.cfg.
Also, adds a header on new.kid, and a title on metrics.kid. Changes to layout.css to make indentations uniform throughout the file. Minor changes to the structure of login.kid
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 0996943..04c43e5 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -282,35 +282,36 @@ class ExtendedMetadata(object):
def insert_pkgtags(self):
""" Download and inject the pkgtags sqlite from the pkgdb """
- try:
- for arch in os.listdir(self.repo):
- if arch == 'SRPMS':
- continue
- filename = ''
- reponame = os.path.basename(self.repo)
- if reponame.startswith('f'):
- release = reponame[1:].split('-')[0]
- filename = 'F-%s-%s-' % (release, arch)
- if 'testing' in reponame:
- filename += 'tu'
+ if config.get('pkgtags_url') not in [None, ""]:
+ try:
+ for arch in os.listdir(self.repo):
+ if arch == 'SRPMS':
+ continue
+ filename = ''
+ reponame = os.path.basename(self.repo)
+ if reponame.startswith('f'):
+ release = reponame[1:].split('-')[0]
+ filename = 'F-%s-%s-' % (release, arch)
+ if 'testing' in reponame:
+ filename += 'tu'
+ else:
+ filename += 'u'
+ elif reponame.startswith('el'):
+ release = reponame[2:].split('-')[0]
+ filename = 'E-%s-%s' % (release, arch)
+ if 'testing' in reponame:
+ filename += '-t'
else:
- filename += 'u'
- elif reponame.startswith('el'):
- release = reponame[2:].split('-')[0]
- filename = 'E-%s-%s' % (release, arch)
- if 'testing' in reponame:
- filename += '-t'
- else:
- log.error('Unknown repo %s' % reponame)
- return
+ log.error('Unknown repo %s' % reponame)
+ return
- tags_url = config.get('pkgtags_url') + filename
- log.info('Downloading %s' % tags_url)
- f = urllib.urlretrieve(tags_url, filename='/tmp/pkgtags.sqlite')
+ tags_url = config.get('pkgtags_url') + filename
+ log.info('Downloading %s' % tags_url)
+ f = urllib.urlretrieve(tags_url, filename='/tmp/pkgtags.sqlite')
- repomd = RepoMetadata(join(self.repo, arch, 'repodata'))
- repomd.add('/tmp/pkgtags.sqlite')
+ repomd = RepoMetadata(join(self.repo, arch, 'repodata'))
+ repomd.add('/tmp/pkgtags.sqlite')
- except Exception, e:
- log.exception(e)
- log.error("There was a problem injecting pkgtags")
+ except Exception, e:
+ log.exception(e)
+ log.error("There was a problem injecting pkgtags")
diff --git a/bodhi/static/css/layout.css b/bodhi/static/css/layout.css
index f546154..bbcfc0b 100644
--- a/bodhi/static/css/layout.css
+++ b/bodhi/static/css/layout.css
@@ -1,12 +1,12 @@
/* $Id: layout.css,v 1.3 2007/01/06 08:03:27 lmacken Exp $ */
body {
- font-size: 0.9em;
- font-family: liberation, veranda, sans-serif;
+ font-size: 0.9em;
+ font-family: liberation, veranda, sans-serif;
color: #4F4F4F;
- margin: 0;
- padding: 0;
- background-color: #d9d9d9;
+ margin: 0;
+ padding: 0;
+ background-color: #d9d9d9;
}
#form_builds_text {
@@ -14,248 +14,232 @@ body {
}
a:link {
- color: #22437F;
+ color: #22437F;
}
a:visited {
- color: #48468f;
+ color: #48468f;
}
a:hover {
- color: #f20;
+ color: #f20;
}
a[name] {
- color: inherit;
- text-decoration: inherit;
+ color: inherit;
+ text-decoration: inherit;
}
#fedora-header {
- background-color: #fff;
- height: 62px;
+ background-color: #fff;
+ height: 62px;
}
#fedora-header img {
- border: 0;
- vertical-align: middle;
+ border: 0;
+ vertical-align: middle;
}
#fedora-header-logo {
- /* position is offset by the header padding amount */
- position: absolute;
- left: 26px;
- top: 13px;
- z-index: 3;
+ /* position is offset by the header padding amount */
+ position: absolute;
+ left: 26px;
+ top: 13px;
+ z-index: 3;
}
#fedora-header-logo img {
/*
- width: 110px;
- height: 40; */
+ width: 110px;
+ height: 40; */
}
#fedora-header-items {
- /* position is offset by the header padding amount */
- position: absolute;
- right: 10px;
- top: 8px;
- text-align: right;
- display: inline;
+ /* position is offset by the header padding amount */
+ position: absolute;
+ right: 10px;
+ top: 8px;
+ text-align: right;
+ display: inline;
}
#fedora-header-items a {
- color: #000;
- text-decoration: none;
- padding: 7pt;
- font-size: 0.8em;
+ color: #000;
+ text-decoration: none;
+ padding: 7pt;
+ font-size: 0.8em;
}
#fedora-header-items a:hover, #fedora-header-search-button:hover {
- color: #f20;
- cursor: pointer;
+ color: #f20;
+ cursor: pointer;
}
#fedora-header-items img {
- margin-right: 1px;
+ margin-right: 1px;
/*
- width: 36px;
- height: 36px;*/
+ width: 36px;
+ height: 36px;*/
}
#fedora-header-search {
- height: 25px;
+ height: 25px;
}
#fedora-header-search-entry {
- vertical-align: top;
- margin: 0.65em 4px 0 10px;
- padding: 2px 4px;
- background-color: #f5f5f5;
- border: 1px solid #999;
- font-size: 0.8em !important;
+ vertical-align: top;
+ margin: 0.65em 4px 0 10px;
+ padding: 2px 4px;
+ background-color: #f5f5f5;
+ border: 1px solid #999;
+ font-size: 0.8em !important;
}
#fedora-header-search-entry:focus {
- background-color: #fff;
- border: 1px solid #555;
+ background-color: #fff;
+ border: 1px solid #555;
}
#fedora-header-search-button {
- font-size: 0.8em !important;
- vertical-align: top;
- margin-top: 0.2em;
- border: 0;
- padding: 7px;
- padding-left: 21px;
-}
-#fedora-header-items form {
- float: right;
-}
-#fedora-header-items input {
- font-size: 0.85em;
+ font-size: 0.8em !important;
+ vertical-align: top;
+ margin-top: 0.2em;
+ border: 0;
+ padding: 7px;
+ padding-left: 21px;
}
+#fedora-header-items form { float: right; }
+#fedora-header-items input { font-size: 0.85em; }
#fedora-nav {
- margin: 0;
- padding: 0;
- background-color: #22437f;
- font-size: 0;
- height: 5px;
- border-top: 1px solid #000;
- border-bottom: 1px solid #f5f5f5;
+ margin: 0;
+ padding: 0;
+ background-color: #22437f;
+ font-size: 0;
+ height: 5px;
+ border-top: 1px solid #000;
+ border-bottom: 1px solid #f5f5f5;
}
#fedora-nav ul {
- margin: 0;
- padding: 0;
+ margin: 0;
+ padding: 0;
}
#fedora-nav li {
- display: inline;
- list-style: none;
- padding: 0 5pt;
+ display: inline;
+ list-style: none;
+ padding: 0 5pt;
}
#fedora-nav li + li {
- padding-left: 8pt;
- border-left: 1px solid #99a5bf;
+ padding-left: 8pt;
+ border-left: 1px solid #99a5bf;
}
#fedora-nav a {
- color: #c5ccdb;
- text-decoration: none;
-}
-#fedora-nav a:hover {
- color: #fff;
+ color: #c5ccdb;
+ text-decoration: none;
}
+#fedora-nav a:hover { color: #fff; }
#fedora-side-left {
- position: absolute;
- z-index: 2;
- width: 12em;
- /* Space down for the approx line height (fonts) */
- left: 12px;
+ position: absolute;
+ z-index: 2;
+ width: 12em;
+ /* Space down for the approx line height (fonts) */
+ left: 12px;
}
#fedora-side-right {
- position: absolute;
- z-index: 1;
- width: 13em;
- right: 12px;
- padding-top: 3px;
- }
+ position: absolute;
+ z-index: 1;
+ width: 13em;
+ right: 12px;
+ padding-top: 3px;
+}
#fedora-side-left, #fedora-side-right {
- top: 2px;
- /* add to the top margin to compensate for the fixed sizes */
- margin-top: 75px;
- color: #555;
- font-size: 0.9em;
+ top: 2px;
+ /* add to the top margin to compensate for the fixed sizes */
+ margin-top: 75px;
+ color: #555;
+ font-size: 0.9em;
}
#fedora-side-right ul {
- list-style: square inside;
- padding: 0;
- margin: 0;
+ list-style: square inside;
+ padding: 0;
+ margin: 0;
}
/* Left-side naviagation */
-#fedora-side-nav-label {
- display: none;
-}
+#fedora-side-nav-label { display: none; }
#fedora-side-nav {
- list-style: none;
- margin: 0;
- padding: 0;
- border: 1px solid #5976b2;
- border-top: 0;
- background-color: #22437f;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ border: 1px solid #5976b2;
+ border-top: 0;
+ background-color: #22437f;
}
#fedora-side-nav li {
- margin: 0;
- padding: 0;
- border-top: 1px solid #5976b2;
- /* IE/Win gets upset if there is no bottom border... Go figure. */
- border-bottom: 1px solid #22437f;
+ margin: 0;
+ padding: 0;
+ border-top: 1px solid #5976b2;
+ /* IE/Win gets upset if there is no bottom border... Go figure. */
+ border-bottom: 1px solid #22437f;
}
#fedora-side-nav a {
- margin: 0;
- color: #c5ccdb;
- display: block;
- text-decoration: none;
- padding: 4px 6px;
+ margin: 0;
+ color: #c5ccdb;
+ display: block;
+ text-decoration: none;
+ padding: 4px 6px;
}
#fedora-side-nav a:hover {
- background-color: #34548f;
- color: #fff;
+ background-color: #34548f;
+ color: #fff;
}
#fedora-side-nav ul {
- list-style: none;
- margin: 0;
- padding: 0;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
#fedora-side-nav ul li {
- border-top: 1px solid #34548e;
- background-color: #34548e;
- /* IE/Win gets upset if there is no bottom border... Go figure. */
- border-bottom: 1px solid #34548e;
-}
-#fedora-side-nav ul li:hover {
- border-bottom: 1px solid #34548f;
+ border-top: 1px solid #34548e;
+ background-color: #34548e;
+ /* IE/Win gets upset if there is no bottom border... Go figure. */
+ border-bottom: 1px solid #34548e;
}
+#fedora-side-nav ul li:hover { border-bottom: 1px solid #34548f; }
#fedora-side-nav ul li a {
- padding-left: 18px;
- color: #a7b2c9;
+ padding-left: 18px;
+ color: #a7b2c9;
}
#fedora-side-nav ul li a:hover {
- /*
- background-color: #46659e;
- */
-}
-#fedora-side-nav ul ul li a {
- padding-left: 36px;
+ /*
+ background-color: #46659e;
+ */
}
+#fedora-side-nav ul ul li a { padding-left: 36px; }
#fedora-side-nav strong a {
- font-weight: normal;
- color: #fff !important;
- background-color: #10203b;
-}
-#fedora-side-nav strong a:hover {
- background-color: #172e56 !important;
+ font-weight: normal;
+ color: #fff !important;
+ background-color: #10203b;
}
+#fedora-side-nav strong a:hover { background-color: #172e56 !important; }
/* content containers */
#fedora-middle-one, #fedora-middle-two, #fedora-middle-three {
- font-size: 0.9em;
- /* position: relative; */ /* relative to utilize z-index */
- width: auto;
- min-width: 120px;
- margin: 10px;
- z-index: 3; /* content can overlap when the browser is narrow */
+ font-size: 0.9em;
+ /* position: relative; */ /* relative to utilize z-index */
+ width: auto;
+ min-width: 120px;
+ margin: 10px;
+ z-index: 3; /* content can overlap when the browser is narrow */
}
#fedora-middle-two, #fedora-middle-three {
- margin-left: 12em;
- padding-left: 24px;
-}
-#fedora-middle-three {
- margin-right: 13em;
+ margin-left: 12em;
+ padding-left: 24px;
}
+#fedora-middle-three { margin-right: 13em; }
#fedora-content {
- padding-top: 24px;
- padding-bottom: 24px;
- border: 1px solid #aaa;
- background-color: #fff;
+ padding-top: 24px;
+ padding-bottom: 24px;
+ border: 1px solid #aaa;
+ background-color: #fff;
}
#fedora-content > .fedora-corner-bottom { top: 0 }
.fedora-corner-tl, .fedora-corner-tr, .fedora-corner-bl, .fedora-corner-br {
- background-color: #d9d9d9;
- position: relative;
- width: 19px;
- height: 19px;
- /* The following line is to render PNGs with alpha transparency within IE/Win, using DirectX */
- /* Work-around for IE6/Mac borkage (Part 1) */
- display: none;
+ background-color: #d9d9d9;
+ position: relative;
+ width: 19px;
+ height: 19px;
+ /* The following line is to render PNGs with alpha transparency within IE/Win, using DirectX */
+ /* Work-around for IE6/Mac borkage (Part 1) */
+ display: none;
}
.fedora-corner-tl, .fedora-corner-bl { float: left; left: 0px; }
@@ -269,75 +253,71 @@ html>body .fedora-corner-bl { background: #d9d9d9 url("/updates/static/images/co
html>body .fedora-corner-br { background: #d9d9d9 url("/updates/static/images/corner-br.png") no-repeat right bottom; }
.fedora-corner-tl, .fedora-corner-tr, .fedora-corner-bl, .fedora-corner-br {
- /* Restore the view for everything but IE6/Mac (part 2 of the "IE/Mac fix") */
- display: block;
+ /* Restore the view for everything but IE6/Mac (part 2 of the "IE/Mac fix") */
+ display: block;
}
-.fedora-corner-bl, .fedora-corner-br {
- top: 0px;
-}
+.fedora-corner-bl, .fedora-corner-br { top: 0px; }
.content { margin: 0 1em }
#fedora-sidelist {
- position: relative;
- bottom: 3px;
- margin: 0;
- padding: 3px !important;
- border: 1px solid #bbb;
- background-color: #ccc;
- -moz-border-radius: 2.5px;
+ position: relative;
+ bottom: 3px;
+ margin: 0;
+ padding: 3px !important;
+ border: 1px solid #bbb;
+ background-color: #ccc;
+ -moz-border-radius: 2.5px;
}
#fedora-sidelist strong a {
- font-weight: normal;
- background-color: #555;
- color: #fff;
+ font-weight: normal;
+ background-color: #555;
+ color: #fff;
}
#fedora-sidelist strong a:hover {
- background-color: #333;
- color: #fff;
+ background-color: #333;
+ color: #fff;
}
#fedora-sidelist li {
- list-style-position: outside;
- font-size: 0.9em;
- list-style: none;
- border: 1px solid #ccc;
- border-width: 1px 0;
- padding: 0;
- list-style: none;
+ list-style-position: outside;
+ font-size: 0.9em;
+ list-style: none;
+ border: 1px solid #ccc;
+ border-width: 1px 0;
+ padding: 0;
+ list-style: none;
}
#fedora-sidelist li a {
- text-decoration: none;
- display: block;
- padding: 6px 8px;
- -moz-border-radius: 2.5px;
+ text-decoration: none;
+ display: block;
+ padding: 6px 8px;
+ -moz-border-radius: 2.5px;
}
#fedora-sidelist li a:hover {
- background-color: #999;
- color: #eee;
+ background-color: #999;
+ color: #eee;
}
#fedora-footer {
- font-size: 0.75em;
- text-align: right;
- color: #777;
- margin-bottom: 2em;
+ font-size: 0.75em;
+ text-align: right;
+ color: #777;
+ margin-bottom: 2em;
margin-right: 2em;
}
#fedora-printable {
- text-align: center;
- margin: 1em 0;
- font-size: 0.85em;
+ text-align: center;
+ margin: 1em 0;
+ font-size: 0.85em;
}
#fedora-printable a {
- text-decoration: none;
- padding: 5px 0;
- padding-left: 18px;
- background: transparent url("/images/printable.png") no-repeat left;
-}
-#fedora-printable a:hover {
- text-decoration: underline;
+ text-decoration: none;
+ padding: 5px 0;
+ padding-left: 18px;
+ background: transparent url("/images/printable.png") no-repeat left;
}
+#fedora-printable a:hover { text-decoration: underline; }
input.c1 {
font-size:12px;
@@ -487,13 +467,7 @@ td.value {
padding: 5px;
}
-h1.padded {
- padding-left: 10px;
-}
-
-p.padded {
- padding-left: 10px;
-}
+.padded { padding-left: 10px; }
/*
td.title {
@@ -510,20 +484,17 @@ td.value {
padding-left: 5px;
}
-.release
-{
+.release {
overflow: auto;
}
-.release .link
-{
+.release .link {
float: left;
margin: 0;
padding: 0;
}
-.release .rsslink
-{
+.release .rsslink {
float: right;
width: 18px;
overflow:hidden;
@@ -531,21 +502,18 @@ td.value {
padding-right: 4px!important;
}
-.release .rsslink:hover, .release .link:hover
-{
+.release .rsslink:hover, .release .link:hover {
background: none!important;
}
-.rsslink img
-{
+.rsslink img {
display: block;
border: none;
margin: 0;
padding: 0;
}
-#mashstatus
-{
+#mashstatus {
overflow: scroll;
height: 50em;
}
diff --git a/bodhi/templates/login.kid b/bodhi/templates/login.kid
index eb41cfc..c090fa1 100644
--- a/bodhi/templates/login.kid
+++ b/bodhi/templates/login.kid
@@ -11,25 +11,21 @@
</head>
<body onload="document.login.user_name.focus()">
- <blockquote>
- <h1 class="padded">Fedora Update System</h1>
- <p class="padded">${message}<br/>
- Hint: Use your Fedora username, not your e-mail address.</p>
- </blockquote>
- <form action="${previous_url}" method="POST" name="login">
+ <div class="padded">
+ <h1>Fedora Update System</h1>
+ <p>${message}</p>
+ <p>Hint: Use your Fedora username, not your e-mail address.</p>
+ </div>
+ <form action="${tg.url(previous_url)}" method="POST" name="login">
<table class="login">
<tr>
- <td class="title">
- Username:
- </td>
+ <td class="title">Username:</td>
<td class="value">
<input type="text" size="25" name="user_name" />
</td>
</tr>
<tr>
- <td class="title">
- Password:
- </td>
+ <td class="title">Password:</td>
<td class="value">
<input type="password" size="25" name="password" />
</td>
@@ -48,9 +44,6 @@
<input py:for="name,value in original_parameters.items()"
type="hidden" name="${name}" value="${value}"/>
</form>
- <blockquote>
- <p class="padded">Forgot your password? Reset it in the <a href="https://admin.fedoraproject.org/accounts/user/resetpass">Fedora Accounts System</a>.</p>
- </blockquote>
-
+ <p class="padded">Forgot your password? Reset it in the <a href="https://admin.fedoraproject.org/accounts/user/resetpass">Fedora Accounts System</a>.</p>
</body>
</html>
diff --git a/bodhi/templates/metrics.kid b/bodhi/templates/metrics.kid
index f3f4628..09563e0 100644
--- a/bodhi/templates/metrics.kid
+++ b/bodhi/templates/metrics.kid
@@ -5,6 +5,7 @@
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<script language="javascript" type="text/javascript" src="${tg.url('/static/js/jquery.flot.js')}"></script>
<script language="javascript" type="text/javascript" src="${tg.url('/static/js/excanvas.js')}"></script>
+ <title>${title}</title>
</head>
<body>
<center>
diff --git a/bodhi/templates/new.kid b/bodhi/templates/new.kid
index 40c8933..d605d61 100644
--- a/bodhi/templates/new.kid
+++ b/bodhi/templates/new.kid
@@ -65,6 +65,7 @@
<div py:for="field in hidden_fields"
py:replace="field.display(value_for(field), **params_for(field))" />
+ <h3 class="padded">Add New Update</h3>
<table border="0" cellspacing="0" cellpadding="0">
<tr py:for="i, field in enumerate(fields)">
<td class="title">
13 years
Makefile
by Luke Macken
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 6527d5db55bb91f49c6f97455fca26269a7c05e9
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Apr 6 13:47:50 2011 -0400
Set the PYTHONPATH in our Makefile init target
diff --git a/Makefile b/Makefile
index ad4923a..f5e0fce 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ pyflakes:
init:
wget -N https://fedorahosted.org/releases/b/o/bodhi/bodhi-pickledb.tar.bz2
tar -jxvf bodhi-pickledb.tar.bz2
- tg-admin --config=bodhi.cfg sql create && bodhi/tools/init.py && bodhi/tools/dev_init.py && bodhi/tools/pickledb.py load bodhi-pickledb-*
+ PYTHONPATH=$(pwd) tg-admin --config=bodhi.cfg sql create && PYTHONPATH=$(pwd) bodhi/tools/init.py && PYTHONPATH=$(pwd) bodhi/tools/dev_init.py && PYTHONPATH=$(pwd) bodhi/tools/pickledb.py load bodhi-pickledb-*
# remove the untared pickledb
rm bodhi-pickledb-*
13 years