2 commits - bodhi/config bodhi/masher.py
by Luke Macken
bodhi/config/app.cfg | 2 +-
bodhi/masher.py | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit e34e421586fe64385f5a0180de106ca40a08eaab
Author: Bill Nottingham <notting(a)redhat.com>
Date: Thu Mar 11 14:06:38 2010 -0500
Switch default to git for comps; rename config option.
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 3bdf335..6a42e5d 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -37,7 +37,7 @@ jobs = 'cache_release_data refresh_metrics'
## Comps configuration
comps_dir = '/usr/share/bodhi/comps'
-comps_cvs = ':pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs'
+comps_url = 'git://git.fedorahosted.org/comps.git'
##
## Mirror settings
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 1260210..28c72fb 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -442,7 +442,7 @@ class MashTask(Thread):
"""
log.debug("Updating comps...")
comps_dir = config.get('comps_dir')
- comps_url = config.get('comps_cvs')
+ comps_url = config.get('comps_url')
if not exists(comps_dir):
if comps_url.startswith('git://'):
cmd = 'git clone %s' % (comps_url,)
commit 8050fd4dc49270370e439ade815e8f80db95db82
Author: Bill Nottingham <notting(a)redhat.com>
Date: Thu Mar 11 14:06:37 2010 -0500
Handle git as well as CVS locations for comps.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 5c0e178..1260210 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -442,11 +442,18 @@ class MashTask(Thread):
"""
log.debug("Updating comps...")
comps_dir = config.get('comps_dir')
+ comps_url = config.get('comps_cvs')
if not exists(comps_dir):
- cmd = 'cvs -d %s co comps' % config.get('comps_cvs')
+ if comps_url.startswith('git://'):
+ cmd = 'git clone %s' % (comps_url,)
+ else:
+ cmd = 'cvs -d %s co comps' % (comps_url,)
log.debug("running command: %s" % cmd)
subprocess.call(cmd, shell=True, cwd=comps_dir)
- subprocess.call('cvs update', shell=True, cwd=comps_dir)
+ if comps_url.startswith('git://'):
+ subprocess.call('git pull', shell=True, cwd=comps_dir)
+ else:
+ subprocess.call('cvs update', shell=True, cwd=comps_dir)
subprocess.call('make', shell=True, cwd=comps_dir)
def update_symlinks(self):
14 years, 1 month
bodhi/model.py
by Luke Macken
bodhi/model.py | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
New commits:
commit 2e0f2a8220b12686263d1b686138ac8525c181bd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 17 18:10:41 2010 -0400
Don't add the admin group to the commenter name if they're bodhi or anonymous
diff --git a/bodhi/model.py b/bodhi/model.py
index c76fcdd..55bb9fe 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -701,19 +701,20 @@ class PackageUpdate(SQLObject):
if not author: author = identity.current.user_name
critpath_approved = self.critpath_approved
- # Hack: Add admin groups to usernames (eg: "lmacken (releng)")
- admin_groups = config.get('admin_groups',
- 'releng qa security_respons').split()
+ # Add admin groups to usernames (eg: "lmacken (releng)")
+ if not anonymous and author != 'bodhi':
+ admin_groups = config.get('admin_groups',
+ 'releng qa security_respons').split()
- try:
- for group in identity.current.groups:
- if group in admin_groups:
- author += ' (%s)' % group
- break
- except RequestRequiredException:
- # This happens when we're adding comments from the masher,
- # in which case this block is not necessary
- pass
+ try:
+ for group in list(identity.current.groups)[::-1]:
+ if group in admin_groups:
+ author += ' (%s)' % group
+ break
+ except RequestRequiredException:
+ # This happens when we're adding comments from the masher,
+ # in which case this block is not necessary
+ pass
if not anonymous and karma != 0 and \
not filter(lambda c: c.author == author and c.karma == karma,
14 years, 1 month
bodhi/controllers.py bodhi/model.py
by Luke Macken
bodhi/controllers.py | 1 +
bodhi/model.py | 25 +++++++++++++++----------
2 files changed, 16 insertions(+), 10 deletions(-)
New commits:
commit 9eedebae669833777ceb25282cfb56ab7b992f6b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 17 17:27:29 2010 -0400
Add a PackageUpdate.people_to_notify method, and make sure that
we notify more than just bodhi admins when an update is deleted.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index cabc879..c7deb1e 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -449,6 +449,7 @@ class Root(controllers.RootController):
update.destroySelf()
flash_log(msg)
mail.send_admin('deleted', update)
+ mail.send(update.people_to_notify(), 'deleted', update)
else:
flash_log("Cannot delete a pushed update")
except SQLObjectNotFound:
diff --git a/bodhi/model.py b/bodhi/model.py
index b002b6a..c76fcdd 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -762,16 +762,7 @@ class PackageUpdate(SQLObject):
mail.send_admin('critpath_approved', self)
# Send a notification to everyone that has commented on this update
- people = set()
- people.add(self.submitter)
- # Until we can differentiate between maintainers and committers
- #for person in self.get_maintainers():
- # people.add(person)
- for comment in self.comments:
- if comment.anonymous or comment.author == 'bodhi':
- continue
- people.add(comment.author.split()[0])
- mail.send(people, 'comment', self)
+ mail.send(self.people_to_notify(), 'comment', self)
def unpush(self):
""" Move this update back to its dist-fX-updates-candidate tag """
@@ -913,6 +904,20 @@ class PackageUpdate(SQLObject):
'critpath.num_admin_approvals', 2) and \
self.karma >= config.get('critpath.min_karma', 2)
+ def people_to_notify(self):
+ """ Return a list of people to notify when this update changes """
+ people = set()
+ people.add(self.submitter)
+ for comment in self.comments:
+ if comment.anonymous or comment.author == 'bodhi':
+ continue
+ people.add(comment.author.split()[0])
+ # This won't differentiate between maintainers and committers.
+ # Do we want to spam *all* committers of a package for all
+ # of it's updates? If so,
+ #for person in self.get_maintainers():
+ # people.add(person)
+ return people
class Comment(SQLObject):
timestamp = DateTimeCol(default=datetime.utcnow)
14 years, 1 month
3 commits - bodhi/mail.py bodhi/templates
by Luke Macken
bodhi/mail.py | 4 ++--
bodhi/templates/mine.kid | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 6ff1b3247f1aed824bdf6a864069ce371ef59b82
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Mar 16 13:48:30 2010 -0400
Add the paginator to the bottom of the My Updates section
diff --git a/bodhi/templates/mine.kid b/bodhi/templates/mine.kid
index 84ae2ae..cb38bc0 100644
--- a/bodhi/templates/mine.kid
+++ b/bodhi/templates/mine.kid
@@ -77,5 +77,13 @@
</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>
commit 7761170e36c8b0f97b7f7af3874fa8af1cbfe3b1
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Mar 16 13:48:09 2010 -0400
Fix the karma icons in the 'My Updates' section
diff --git a/bodhi/templates/mine.kid b/bodhi/templates/mine.kid
index a119047..84ae2ae 100644
--- a/bodhi/templates/mine.kid
+++ b/bodhi/templates/mine.kid
@@ -62,7 +62,12 @@
</td>
<td class="list">
<center>
- <img src="${tg.url('/static/images/karma%d.png' % update.karma)}" /> ${update.karma}
+ <?python
+ if update.karma < 0: karma = -1
+ elif update.karma > 0: karma = 1
+ else: karma = 0
+ ?>
+ <img src="${tg.url('/static/images/karma%d.png' % karma)}" /> ${update.karma}
</center>
</td>
<td class="list">
commit 963d12465548f949dcd91aa422aa0d4f07c5694e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Mar 16 13:47:48 2010 -0400
Spit out TurboMail's exception instead of printing our own message
diff --git a/bodhi/mail.py b/bodhi/mail.py
index 78a83a8..e9dafe6 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -416,8 +416,8 @@ def send_mail(sender, to, subject, body):
try:
log.debug("Sending mail: %r" % message.plain)
turbomail.enqueue(message)
- except MailNotEnabledException:
- log.warning("TurboMail is not enabled!")
+ except MailNotEnabledException, e:
+ log.warning(str(e))
except Exception, e:
log.exception(e)
log.error("Exception thrown when trying to send mail: %s" % str(e))
14 years, 1 month
bodhi/templates
by Mathieu Bridon
bodhi/templates/show.kid | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit bea1eb711c2f9fe985fbf98b861c163e499e566e
Author: Mathieu Bridon <bochecha(a)fedoraproject.org>
Date: Fri Mar 12 21:44:55 2010 +0100
Ticket #395: URLs containing underscores in descriptions break when shown on web interface
Underscores are a fairly common character in updates descriptions, especially in
URLs. Let's ask markdown2 to ignore them.
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 2ae0995..82d1868 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -39,7 +39,11 @@ release = util.link(update.release.long_name, '/' + update.release.name)
submitter = util.link(update.submitter, '/user/' + update.submitter)
reg = re.compile(r'(^[-*] .*(?:\n[-*] .*)*)', re.MULTILINE)
-notes = markdown(reg.sub(r'\n\1\n', escape(update.notes)))
+
+markdown_extras = [
+ "code-friendly" # Disable _ and __ for em and strong. Underscores is a frequent character in URLs, let's not break them.
+ ]
+notes = markdown(reg.sub(r'\n\1\n', escape(update.notes)), extras=markdown_extras)
if update.karma < 0: karma = -1
elif update.karma > 0: karma = 1
14 years, 1 month
apache/bodhi.conf
by Luke Macken
apache/bodhi.conf | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit e3e295b3b3c69e7b23c024445ddfbafaa09ce7e9
Author: Josh Kayse <joshkayse(a)fedoraproject.org>
Date: Fri Mar 5 09:30:35 2010 -0500
force https for login page
diff --git a/apache/bodhi.conf b/apache/bodhi.conf
index b7b8e74..6293c82 100644
--- a/apache/bodhi.conf
+++ b/apache/bodhi.conf
@@ -13,3 +13,11 @@ WSGIScriptAlias /updates /usr/share/bodhi/bodhi.wsgi/updates
Order deny,allow
Allow from all
</Location>
+
+<Location /updates/login>
+ # required for rewrite rule
+ Options +SymLinksIfOwnerMatch
+ RewriteEngine on
+ RewriteCond %{HTTPS} off
+ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
+</Location>
14 years, 2 months
2 commits - bodhi/model.py bodhi/release.py bodhi.spec
by Luke Macken
bodhi.spec | 5 ++++-
bodhi/model.py | 7 +++++--
bodhi/release.py | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 3bed185b9ac5e63792175687e5683cee7776637f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Mar 8 15:45:39 2010 -0500
Make our unstable karma obsoletion message configurable, and slightly more useful
diff --git a/bodhi/model.py b/bodhi/model.py
index 34d2220..b002b6a 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -749,7 +749,8 @@ class PackageUpdate(SQLObject):
if self.status == 'testing' and self.unstable_karma != 0 and \
self.karma == self.unstable_karma:
log.info("Automatically unpushing %s" % self.title)
- self.obsolete()
+ self.obsolete(msg='This update has reached a karma of %s and is '
+ 'being unpushed and marked as unstable' % self.karma)
mail.send(self.submitter, 'unstable', self)
# If we're a Critical Path update for a pending release
@@ -814,7 +815,7 @@ class PackageUpdate(SQLObject):
log.exception(e)
self.pushed = False
- def obsolete(self, newer=None):
+ def obsolete(self, newer=None, msg=None):
"""
Obsolete this update. Even though unpushing/obsoletion is an "instant"
action, changes in the repository will not propagate until the next
@@ -828,6 +829,8 @@ class PackageUpdate(SQLObject):
if newer:
self.comment("This update has been obsoleted by %s" % newer,
author='bodhi')
+ elif msg:
+ self.comment(msg, author='bodhi')
else:
self.comment("This update has been obsoleted", author='bodhi')
commit 96f35eab0d3e4a841b9a951982444a8ee03e029c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Mar 4 16:12:45 2010 -0500
0.7.4
diff --git a/bodhi.spec b/bodhi.spec
index 2c54959..52ab6a6 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: bodhi
-Version: 0.7.3
+Version: 0.7.4
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -116,6 +116,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Thu Mar 04 2010 Luke Macken <lmacken(a)redhat.com> - 0.7.4-1
+- 0.7.4
+
* Thu Mar 04 2010 Luke Macken <lmacken(a)redhat.com> - 0.7.3-1
- 0.7.3
diff --git a/bodhi/release.py b/bodhi/release.py
index 3f72f5e..ff270ef 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.7.3'
+VERSION = '0.7.4'
NAME = 'bodhi'
DESCRIPTION = 'Bodhi is a modular web-system that facilitates the process of publishing updates for a Fedora-based software distribution'
AUTHOR = 'Luke Macken'
14 years, 2 months
Changes to 'refs/tags/0.7.4'
by Luke Macken
Tag '0.7.4' created by Luke Macken <lmacken(a)redhat.com> at 2010-03-04 21:12 +0000
0.7.4
Changes since 0.7.3:
Luke Macken (3):
Refactor the "Push to stable" logic in our show.kid, hopefully multiple issues.
Add our paginator at the bottom of our grids as well as the top
0.7.4
---
bodhi.spec | 5 +-
bodhi/release.py | 2
bodhi/templates/critpath.kid | 9 ++++
bodhi/templates/list.kid | 8 +++
bodhi/templates/pending.kid | 9 ++++
bodhi/templates/show.kid | 85 +++++++++++++++++++++-------------------
bodhi/templates/testing.kid | 8 +++
bodhi/tests/test_controllers.py | 4 +
8 files changed, 89 insertions(+), 41 deletions(-)
---
14 years, 2 months
bodhi/templates
by Luke Macken
bodhi/templates/critpath.kid | 9 +++++++++
bodhi/templates/list.kid | 8 ++++++++
bodhi/templates/pending.kid | 9 +++++++++
bodhi/templates/testing.kid | 8 ++++++++
4 files changed, 34 insertions(+)
New commits:
commit 70b0abaa2e4e881792bd16a84ba69a85b7b578a4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Mar 4 11:46:59 2010 -0500
Add our paginator at the bottom of our grids as well as the top
diff --git a/bodhi/templates/critpath.kid b/bodhi/templates/critpath.kid
index 51525ca..00296fe 100644
--- a/bodhi/templates/critpath.kid
+++ b/bodhi/templates/critpath.kid
@@ -80,5 +80,14 @@
</tr>
</table>
+ <div 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>
+ <a href="?tg_paginate_limit=${num_items}">all</a>
+ </div>
+
</body>
</html>
diff --git a/bodhi/templates/list.kid b/bodhi/templates/list.kid
index 9cb8ee7..4baf2d8 100644
--- a/bodhi/templates/list.kid
+++ b/bodhi/templates/list.kid
@@ -56,5 +56,13 @@
</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/templates/pending.kid b/bodhi/templates/pending.kid
index 8a19767..3871999 100644
--- a/bodhi/templates/pending.kid
+++ b/bodhi/templates/pending.kid
@@ -63,5 +63,14 @@
</tr>
</table>
+ <div 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>
+ <a href="?tg_paginate_limit=${num_items}">all</a>
+ </div>
+
</body>
</html>
diff --git a/bodhi/templates/testing.kid b/bodhi/templates/testing.kid
index 05dff2a..8f63743 100644
--- a/bodhi/templates/testing.kid
+++ b/bodhi/templates/testing.kid
@@ -67,5 +67,13 @@
</tr>
</table>
+ <div 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>
14 years, 2 months