bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 54bbad06c28529d8b02ce8a4b67172b6c8b706bc
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 9 19:09:28 2008 -0400
Order our list query results by the date_submitted
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 482e76a..c8c40e8 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -186,13 +186,13 @@ class Root(controllers.RootController):
log.debug('list(%s)' % locals())
query = []
updates = []
+ orderBy = PackageUpdate.q.date_submitted
# If no arguments are specified, return the most recent updates
if not release and not bugs and not cves and not status and not type_ \
and not package and not mine and not username:
log.debug("No arguments, returning latest")
- updates = PackageUpdate.select(
- orderBy=PackageUpdate.q.date_submitted).reversed()
+ updates = PackageUpdate.select(orderBy=orderBy).reversed()
num_items = updates.count()
return dict(updates=updates, num_items=num_items,
title="%d %s found" % (num_items, num_items == 1 and
@@ -217,7 +217,8 @@ class Root(controllers.RootController):
if username:
query.append(PackageUpdate.q.submitter == username)
- updates = PackageUpdate.select(AND(*query))
+ updates = PackageUpdate.select(AND(*query),
+ orderBy=orderBy).reversed()
# The package argument may be an update, build or package.
if package:
15 years, 6 months
3 commits - bodhi/controllers.py bodhi.egg-info/PKG-INFO bodhi/release.py bodhi.spec
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.spec | 5 ++++-
bodhi/controllers.py | 19 ++++++++++++++++---
bodhi/release.py | 2 +-
4 files changed, 22 insertions(+), 6 deletions(-)
New commits:
commit 73dfb078cab3d9c3dfc8316e6ae1eaec03825f1b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 9 14:41:36 2008 -0400
If no arguments are given to list, then return the latest updates
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 2e2ccbd..482e76a 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -187,6 +187,17 @@ class Root(controllers.RootController):
query = []
updates = []
+ # If no arguments are specified, return the most recent updates
+ if not release and not bugs and not cves and not status and not type_ \
+ and not package and not mine and not username:
+ log.debug("No arguments, returning latest")
+ updates = PackageUpdate.select(
+ orderBy=PackageUpdate.q.date_submitted).reversed()
+ num_items = updates.count()
+ return dict(updates=updates, num_items=num_items,
+ title="%d %s found" % (num_items, num_items == 1 and
+ 'update' or 'updates'))
+
try:
if release:
# TODO: if a specific release is requested along with get_auth,
commit 0ce3d6bfac1d10bd33fd1473406bba5a6548c11b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 9 14:41:24 2008 -0400
Add a 'username' argument to our list method
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 18d5ffa..2e2ccbd 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -180,10 +180,10 @@ class Root(controllers.RootController):
@expose(template="bodhi.templates.list", allow_json=True)
@paginate('updates', limit=20, allow_limit_override=True)
def list(self, release=None, bugs=None, cves=None, status=None, type_=None,
- package=None, mine=False, stringify=False, get_auth=False):
+ package=None, mine=False, stringify=False, get_auth=False,
+ username=None):
""" Return a list of updates based on given parameters """
- log.debug("list(%s, %s, %s, %s, %s, %s, %s, %s, %s)" % (release, bugs,
- cves, status, type_, package, mine, stringify, get_auth))
+ log.debug('list(%s)' % locals())
query = []
updates = []
@@ -203,6 +203,8 @@ class Root(controllers.RootController):
if mine:
query.append(
PackageUpdate.q.submitter == identity.current.user_name)
+ if username:
+ query.append(PackageUpdate.q.submitter == username)
updates = PackageUpdate.select(AND(*query))
commit 64b8f1fd157f01b44348076497dc9d677a0f6bc5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Oct 7 19:04:16 2008 -0400
0.5.6
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 3614295..a20bf1f 100644
--- a/bodhi.egg-info/PKG-INFO
+++ b/bodhi.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: bodhi
-Version: 0.5.5
+Version: 0.5.6
Summary: Bodhi is a modular web-system that facilitates the process of publishing updates for a Fedora-based software distribution
Home-page: https://fedorahosted.org/bodhi
Author: Luke Macken
diff --git a/bodhi.spec b/bodhi.spec
index 857c340..67f5d15 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.5.5
+Version: 0.5.6
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -112,6 +112,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Tue Oct 07 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.6-1
+- Latest upstream release.
+
* Mon Oct 06 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.5-1
- Latest upstream release.
diff --git a/bodhi/release.py b/bodhi/release.py
index c7aa1f0..2c82042 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.5'
+VERSION = '0.5.6'
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'
15 years, 6 months
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit a2345d531e0622bacb55f25ed359978ac28ab809
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Oct 7 18:55:42 2008 -0400
Fix a potential XSS vulnerability
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 88442d5..18d5ffa 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -19,6 +19,7 @@ import logging
import cherrypy
import xmlrpclib
+from cgi import escape
from koji import GenericError
from datetime import datetime
from sqlobject import SQLObjectNotFound
@@ -863,7 +864,7 @@ class Root(controllers.RootController):
return dict(tg_template=template, updates=[], num_items=0,
title='No updates found')
- flash_log("The path %s cannot be found" % cherrypy.request.path)
+ flash_log("The path %s cannot be found" % escape(cherrypy.request.path))
raise redirect("/")
@expose(template='bodhi.templates.show')
15 years, 7 months
bodhi.egg-info/PKG-INFO bodhi/tools
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi/tools/tagcheck.py | 35 +++++++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 5 deletions(-)
New commits:
commit b0df37067eeff884f837a21754595a90327c4af4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 20:15:38 2008 -0400
Update our tagcheck script to verify candidate and testing updates
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 042be39..3614295 100644
--- a/bodhi.egg-info/PKG-INFO
+++ b/bodhi.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: bodhi
-Version: 0.5.3
+Version: 0.5.5
Summary: Bodhi is a modular web-system that facilitates the process of publishing updates for a Fedora-based software distribution
Home-page: https://fedorahosted.org/bodhi
Author: Luke Macken
diff --git a/bodhi/tools/tagcheck.py b/bodhi/tools/tagcheck.py
index 2fb14a8..625fe29 100755
--- a/bodhi/tools/tagcheck.py
+++ b/bodhi/tools/tagcheck.py
@@ -9,13 +9,38 @@ from sqlobject import SQLObjectNotFound
from turbogears.database import PackageHub
from bodhi.util import load_config
-from bodhi.model import PackageBuild
+from bodhi.model import PackageBuild, PackageUpdate
from bodhi.buildsys import get_session
def main():
load_config()
__connection__ = hub = PackageHub("bodhi")
koji = get_session()
+
+ # Check for testing updates that aren't tagged properly
+ for update in PackageUpdate.select(PackageUpdate.q.status=='testing'):
+ for build in update.builds:
+ tags = [tag['name'] for tag in koji.listTags(build=build.nvr)]
+ if '%s-updates-testing' % update.release.dist_tag not in tags:
+ print "%s marked as testing, but tagged with %s" % (build.nvr,
+ tags)
+
+ # Check all candidate updates to see if they are in a different bodhi state
+ for tag in ('dist-f9-updates-candidate', 'dist-f8-updates-candidate'):
+ tagged = [build['nvr'] for build in koji.listTagged(tag)]
+ for nvr in tagged:
+ try:
+ build = PackageBuild.byNvr(nvr)
+ for update in build.updates:
+ if update.status in ('testing', 'stable'):
+ print "%s %s but tagged as %s" % (nvr,
+ update.status,
+ tag)
+ except SQLObjectNotFound:
+ pass
+
+ # Make sure that all builds in koji tagged as an update exist
+ # in bodhi, and are in the expect state.
for tag in ('dist-f9-updates-testing', 'dist-f9-updates',
'dist-f8-updates-testing', 'dist-f8-updates'):
tagged = [build['nvr'] for build in koji.listTagged(tag)]
@@ -30,9 +55,11 @@ def main():
status = 'testing' in tag and 'testing' or 'stable'
for update in build.updates:
if update.status != status:
- print "%s is %s in bodhi but tagged as %s in koji" % (update.title,
- update.status,
- tag)
+ print "%s is %s in bodhi but tagged as %s in koji" % (
+ update.title, update.status, tag)
+
if __name__ == '__main__':
main()
+
+# vim: ts=4 sw=4 expandtab
15 years, 7 months
bodhi/release.py
by Luke Macken
bodhi/release.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 97d77b547e3141a7e264b7a71d0c5a7ceed8b347
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 19:58:41 2008 -0400
Update our release module
diff --git a/bodhi/release.py b/bodhi/release.py
index 00edd50..c7aa1f0 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.3'
+VERSION = '0.5.5'
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'
15 years, 7 months
3 commits - bodhi.cfg bodhi.egg-info/entry_points.txt bodhi.spec
by Luke Macken
bodhi.cfg | 2 +-
bodhi.egg-info/entry_points.txt | 3 ---
bodhi.spec | 7 +++++--
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit b29dfd0a7694601599d3c9425f7cd72b6bb4f212
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 19:58:01 2008 -0400
0.5.5
diff --git a/bodhi.spec b/bodhi.spec
index cd42ee0..857c340 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,8 +2,8 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: bodhi
-Version: 0.5.3
-Release: 4%{?dist}
+Version: 0.5.5
+Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -112,6 +112,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Mon Oct 06 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.5-1
+- Latest upstream release.
+
* Sat Oct 04 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.4-2
- Make our masher extension point less obtrusive.
commit 50353065d7a25430b41786edf9eefc6c2fc58b4e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 19:57:49 2008 -0400
Update our development password, because I'm too lazy to change mine
diff --git a/bodhi.cfg b/bodhi.cfg
index 34cb149..e00b013 100644
--- a/bodhi.cfg
+++ b/bodhi.cfg
@@ -6,7 +6,7 @@
# DATABASE
#sqlobject.dburi="sqlite:///var/tmp/bodhi.sqlite"
-sqlobject.dburi="postgres://bodhi:b0dh1@localhost/bodhi"
+sqlobject.dburi="postgres://bodhi:B0dh1@localhost/bodhi"
# If you have sqlite, here's a simple default to get you started
# in development
commit d33aa6861695455817f8abd9f8c5a5e32ffc5c54
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 19:57:11 2008 -0400
Update our entry points
diff --git a/bodhi.egg-info/entry_points.txt b/bodhi.egg-info/entry_points.txt
index a92b426..be5abad 100644
--- a/bodhi.egg-info/entry_points.txt
+++ b/bodhi.egg-info/entry_points.txt
@@ -1,6 +1,3 @@
-[turbogears.extensions]
-masher = bodhi.masher
-
[console_scripts]
bodhi-rmrelease = bodhi.tools.rmrelease:main
start-bodhi = bodhi.commands:start
15 years, 7 months
bodhi/masher.py setup.py
by Luke Macken
bodhi/masher.py | 11 +----------
setup.py | 3 ---
2 files changed, 1 insertion(+), 13 deletions(-)
New commits:
commit 19360034e663b778b58c68af0358eae9c84553a1
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 19:55:06 2008 -0400
Convert the Masher into a plain global object instead of a turbogears extension.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 7193d75..ff4b4e8 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -36,7 +36,6 @@ from bodhi.metadata import ExtendedMetadata
from bodhi.exceptions import MashTaskException
log = logging.getLogger(__name__)
-masher = None
lock = Lock()
def get_masher():
@@ -791,12 +790,4 @@ class MashTask(Thread):
log.info(val)
return val
-def start_extension():
- global masher
- if not config.get('masher', True):
- log.info("Starting masher extension")
- masher = Masher()
-
-def shutdown_extension():
- if not config.get('masher', True):
- log.info("Stopping Masher")
+masher = Masher()
diff --git a/setup.py b/setup.py
index f9f40a5..03cb807 100644
--- a/setup.py
+++ b/setup.py
@@ -174,8 +174,5 @@ setup(
'bodhi-devinit = bodhi.tools.dev_init:main',
'bodhi-rmrelease = bodhi.tools.rmrelease:main',
),
- 'turbogears.extensions': (
- 'masher = bodhi.masher'
- ),
}
)
15 years, 7 months
bodhi.cfg bodhi/config bodhi/masher.py bodhi.spec
by Luke Macken
bodhi.cfg | 2 +-
bodhi.spec | 5 ++++-
bodhi/config/app.cfg | 2 +-
bodhi/masher.py | 8 +++++---
4 files changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 86255381252458fa6e52ac24c9b25e6ac51074db
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Oct 4 03:50:53 2008 -0400
Make our masher extension point less obtrusive
diff --git a/bodhi.cfg b/bodhi.cfg
index c20145d..34cb149 100644
--- a/bodhi.cfg
+++ b/bodhi.cfg
@@ -36,7 +36,7 @@ tg.strict_parameters = True
# MASHER
#masher = None # we are the masher
-masher = 'http://localhost:8085/updates' # point to an external masher
+#masher = 'http://localhost:8085/updates' # point to an external masher
# Buildsystem. 'koji' or 'dev' (default)
# buildsystem = 'koji'
diff --git a/bodhi.spec b/bodhi.spec
index f223a4a..cd42ee0 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -3,7 +3,7 @@
Name: bodhi
Version: 0.5.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -112,6 +112,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Sat Oct 04 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.4-2
+- Make our masher extension point less obtrusive.
+
* Tue Sep 16 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.4-1
- Latest upstream release, containing various bugfixes
- Make our python-fedora requirement explicit (#461518)
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index b108de3..728a150 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -19,7 +19,7 @@
# and other costly operations. To set an external masher, set the masher to
# the baseurl of the bodhi instance. If set to None, this bodhi instance
# will act as a masher as well.
-masher = None
+#masher = None
# Where to initially mash repositories
mashed_dir = '%(top_level_dir)s/../mashed'
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 97eb4c4..7193d75 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -793,8 +793,10 @@ class MashTask(Thread):
def start_extension():
global masher
- log.info("Starting masher extension")
- masher = Masher()
+ if not config.get('masher', True):
+ log.info("Starting masher extension")
+ masher = Masher()
def shutdown_extension():
- log.info("Stopping Masher")
+ if not config.get('masher', True):
+ log.info("Stopping Masher")
15 years, 7 months