More info....
by Brian Kosick
Hi again...
I got the /var/log/bodhi logs to show up after
re-reading /etc/bodhi/bodhi.conf and uncommenting the handlers... I
still have the issue where I try to get to http://<MyServer>/updates, it
just churns....
Also, for the koji certs
# Koji certs
client_cert = None
clientca_cert = None
serverca_cert = None
Is it looking for a user cert with just the username, or is it looking
for a cert with the servers FQDN? Also, what kind of entry in the koji
system do I have to add? a use or a host?
Brian
15 years, 7 months
Setup and Config
by Brian Kosick
Hi Luke,
I'm trying to setup koji/bodhi to eval for use within my org, I've setup
koji just fine and am able to successfully perform builds to my hearts
content. I'm trying to setup bodhi, following the directions on the
wiki, https://fedorahosted.org/bodhi/wiki/Deployment and when I try to
go to http://myserver/updates, It just churns and churns and churns....
I get no logs in /var/log/bodhi, nothing in /var/log/httpd/error_log
either. I've checked my perms on the log files and directories and they
are writable by the apache user.
I've installed on a RHEL5.2 server, I've used koji to compile and build
the python rpms that bodhi is dependent on. Everything built and
installed just fine.
Here's my apache bodhi.conf
Alias /updates/static /usr/share/bodhi/static
WSGIDaemonProcess bodhi user=apache maximum-requests=1000
display-name=bodhi
WSGISocketPrefix run/wsgi
WSGIRestrictStdout On
WSGIRestrictSignal Off
WSGIPythonOptimize 2
WSGIScriptAlias /updates /usr/share/bodhi/bodhi.wsgi
<Directory /usr/share/bodhi>
WSGIProcessGroup bodhi
Order deny,allow
Allow from all
</Directory>
my apache wsgi.conf
LoadModule wsgi_module modules/mod_wsgi.so
/usr/share/bodhi/bohdi.wsgi
import sys
sys.stdout = sys.stderr
import pkg_resources
pkg_resources.require("CherryPy<3.0")
import os
os.environ['PYTHON_EGG_CACHE'] = '/var/www/.python-eggs'
import atexit
import cherrypy
import cherrypy._cpwsgi
import turbogears
from bodhi.util import load_config
load_config()
turbogears.config.update({'global': {'server.environment':
'production'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': False}})
turbogears.config.update({'global': {'server.webpath': '/updates'}})
from bodhi import jobs
turbogears.startup.call_on_startup.append(jobs.schedule)
import bodhi.controllers
cherrypy.root = bodhi.controllers.Root()
if cherrypy.server.state == 0:
atexit.register(cherrypy.server.stop)
cherrypy.server.start(init_only=True, server_class=None)
application = cherrypy._cpwsgi.wsgiApp
## Apparently this is needed if we are using a server.webpath,
# but I seem to get lots of 404's when using it compared to without...
#def application(environ, start_response):
# environ['SCRIPT_NAME'] = ''
# return cherrypy._cpwsgi.wsgiApp(environ, start_response)
/etc/bodhi/bodhi.conf
[global]
# This is where all of your settings go for your development environment
# Settings that are the same for both development and production
# (such as template engine, encodings, etc.) all go in
# bodhi/config/app.cfg
# DATABASE
#sqlobject.dburi="sqlite:///var/tmp/bodhi.sqlite"
sqlobject.dburi="postgres://bodhi:<mypass>@<mydb.server.com>/bodhi"
# If you have sqlite, here's a simple default to get you started
# in development
#sqlobject.dburi="notrans_sqlite:///var/tmp/bodhi.sqlite"
#sqlobject.dburi="sqlite:///var/tmp/bodhi.sqlite?debug=True&debugOutput=True"
# if you are using a database or table type without transactions
# (MySQL default, for example), you should turn off transactions
# by prepending notrans_ on the uri
#
sqlobject.dburi="notrans_mysql://username:password@hostname:port/databasename"
# for Windows users, sqlite URIs look like:
# sqlobject.dburi="sqlite:///drive_letter:/path/to/file"
# SERVER
server.socket_port=8084
server.environment="development"
server.webpath="/updates"
server.log_file = "server.log"
server.log_to_screen = True
autoreload.package="bodhi"
tg.strict_parameters = True
#base_url_filter.on = True
#base_url_filter.use_x_forwarded_host = True
# MASHER
#masher = None # we are the masher
masher = 'http://localhost:8085/updates' # point to an external masher
# Buildsystem. 'koji' or 'dev' (default)
# buildsystem = 'koji'
# LOGGING
# Logging configuration generally follows the style of the standard
# Python logging module configuration. Note that when specifying
# log format messages, you need to use *() for formatting variables.
# Deployment independent log configuration is in bodhi/config/log.cfg
[logging]
## These are very useful handlers for production, but they break our
## unit tests when running from git.
##
#[[handlers]]
#
#[[[debug_out]]]
#class='TimedRotatingFileHandler'
#args="('/var/log/bodhi/server.log', 'D', 7)"
#level='DEBUG'
#formatter='full_content'
#
#[[[access_out]]]
#class='TimedRotatingFileHandler'
#level='INFO'
#args="('/var/log/bodhi/access.log', 'D', 7)"
#formatter='message_only'
#
#[[[error_out]]]
#class='TimedRotatingFileHandler'
#args="('/var/log/bodhi/server.log', 'D', 7)"
#level='ERROR'
#formatter='full_content'
[[loggers]]
[[[bodhi]]]
level='DEBUG'
qualname='bodhi'
handlers=['debug_out']
propagate=0
[[[allinfo]]]
level='DEBUG'
handlers=['debug_out']
propagate=0
[[[access]]]
level='DEBUG'
qualname='turbogears.access'
handlers=['access_out']
propagate=0
Here's my /usr/bin/start-bodhi output
/usr/bin/start-bodhi
[cherrypy.msg] INFO 2008-09-29 16:40:14,575 CONFIG: Server parameters:
[cherrypy.msg] INFO 2008-09-29 16:40:14,575 CONFIG:
server.environment: development
[cherrypy.msg] INFO 2008-09-29 16:40:14,575 CONFIG:
server.log_to_screen: True
[cherrypy.msg] INFO 2008-09-29 16:40:14,576 CONFIG: server.log_file:
server.log
[cherrypy.msg] INFO 2008-09-29 16:40:14,576 CONFIG:
server.log_tracebacks: True
[cherrypy.msg] INFO 2008-09-29 16:40:14,576 CONFIG:
server.log_request_headers: True
[cherrypy.msg] INFO 2008-09-29 16:40:14,576 CONFIG:
server.protocol_version: HTTP/1.0
[cherrypy.msg] INFO 2008-09-29 16:40:14,577 CONFIG:
server.socket_host:
[cherrypy.msg] INFO 2008-09-29 16:40:14,577 CONFIG:
server.socket_port: 8084
[cherrypy.msg] INFO 2008-09-29 16:40:14,577 CONFIG:
server.socket_file:
[cherrypy.msg] INFO 2008-09-29 16:40:14,577 CONFIG:
server.reverse_dns: False
[cherrypy.msg] INFO 2008-09-29 16:40:14,578 CONFIG:
server.socket_queue_size: 5
[cherrypy.msg] INFO 2008-09-29 16:40:14,578 CONFIG:
server.thread_pool: 10
[turbogears.visit] INFO 2008-09-29 16:40:14,673 Visit Tracking starting
[turbogears.visit.sovisit] INFO 2008-09-29 16:40:14,724 Succesfully
loaded "bodhi.model.Visit"
[turbogears.visit] INFO 2008-09-29 16:40:14,725 Visit filter initialised
[turbogears.identity] INFO 2008-09-29 16:40:14,734 Identity starting
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,747
Succesfully loaded "bodhi.model.User"
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,747
Succesfully loaded "bodhi.model.Group"
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,747
Succesfully loaded "bodhi.model.Permission"
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,748
Succesfully loaded "bodhi.model.VisitIdentity"
[turbogears.identity] INFO 2008-09-29 16:40:14,769 Identity visit plugin
initialised
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,770
Succesfully loaded "bodhi.model.User"
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,770
Succesfully loaded "bodhi.model.Group"
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,770
Succesfully loaded "bodhi.model.Permission"
[turbogears.identity.soprovider] INFO 2008-09-29 16:40:14,771
Succesfully loaded "bodhi.model.VisitIdentity"
[bodhi.masher] INFO 2008-09-29 16:40:14,773 Starting masher extension
[bodhi.masher] INFO 2008-09-29 16:40:14,773 Starting the Masher
[bodhi.jobs] DEBUG 2008-09-29 16:40:14,774 Scheduling cache_release_data
job
[tgcaptcha.controller] INFO 2008-09-29 16:40:14,776 Attached controller
"/captcha" to the application
[bodhi.jobs] INFO 2008-09-29 16:40:14,776 Caching release metrics
[turbogears.startup] INFO 2008-09-29 16:40:14,778 Scheduler started
[bodhi.jobs] INFO 2008-09-29 16:40:14,780 Release cache complete
[cherrypy.msg] INFO 2008-09-29 16:40:14,880 HTTP: Serving HTTP on
http://0.0.0.0:8084/
Errm also, here's my app.cfg
/usr/lib/python2.4/site-packages/bodhi/config/app.cfg
# $Id: app.cfg,v 1.6 2007/01/06 08:03:21 lmacken Exp $
# The settings in this file should not vary depending on the deployment
# environment. dev.cfg and prod.cfg are the locations for
# the different deployment settings. Settings in this file will
# be overridden by settings in those other files.
##
## Note: Release settings can be found in init.py
##
[global]
##
## Mash settings
##
# The masher is a bodhi instance that is responsible for composing the
update
# repositories, regenerating metrics, sending update notices, closing
bugs,
# 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
# Where to initially mash repositories
mashed_dir = '%(top_level_dir)s/../mashed'
# Where to move the verified composed repos after they are mashed
mashed_stage_dir = '%(top_level_dir)s/../mash/updates'
mash_conf = '%(top_level_dir)s/config/mash.conf'
createrepo_cache_dir = "/var/tmp/createrepo"
## Our periodic jobs
#jobs = 'clean_repo nagmail fix_bug_titles cache_release_data'
jobs = 'cache_release_data'
## Comps configuration
comps_dir = '/usr/share/bodhi/comps'
comps_cvs = ':pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs'
##
##
## Mirror settings
##
file_url = 'http://download.fedoraproject.org/pub/fedora/linux/updates'
master_repomd =
'http://download.fedora.redhat.com/pub/fedora/linux/updates/%
d/i386/repodata/repomd.xml'
master_newkey_repomd =
'http://download.fedora.redhat.com/pub/fedora/linux/updates/%
d/i386.newkey/repodata/repomd.xml'
## The base url of this application (should not include server.webpath)
#base_address = 'http://build64.qa.mxlogic.com:8084'
base_address = 'http://build64.qa.mxlogic.com:8084'
## Supported update types
update_types = 'bugfix enhancement security newpackage'
## Supported architechures
arches = 'i386 x86_64 ppc'
##
## Contact setting
##
# The updates system itself. This email address is used in fetching
Bugzilla
# information, as well as email notifications
bodhi_email = None
bodhi_password=None
# The address that gets the requests
release_team_address = None
# The address to notify when security updates are initially added to
bodhi
security_team = None
# Superuser groups
admin_groups = 'releng security_respons cvsadmin'
# Where do we send update announcements to ?
# These variables should be named per:
Release.prefix_id.lower()_announce_list
fedora_announce_list = None
fedora_test_announce_list = None
##
## TurboMail settings
##
mail.on = False
mail.server = None
mail.debug = False
mail.encoding = 'utf-8-qp'
##
## Buildsystem settings
##
# What buildsystem do we want to use? For development, we'll use a fake
# buildsystem that always does what we tell it to do. For production,
we'll
# want to use 'koji'.
buildsystem = 'dev'
# Where we can find packages by /name/version/release/arch/
build_dir = '%(top_level_dir)s/../packages'
# Koji's XML-RPC hub
koji_hub = 'https://build64.qa.mxlogic.com/kojihub'
# Koji certs
client_cert = None
clientca_cert = None
serverca_cert = None
##
## ACL system
## Choices are 'pkgdb', which will send a JSON query to the pkgdb_url
below,
## or 'dummy', which will always return guest credentials (used for
local
## development).
##
acl_system = 'dummy'
##
## Package DB
##
pkgdb_url = 'https://admin.fedoraproject.org/pkgdb'
##
## Bugzilla settings. The username/password for our bugzilla account
comes
## from the bodhi_{email,password} fields.
##
bz_server = 'https://bugzilla.redhat.com/xmlrpc.cgi'
##
## Packages that should suggest a reboot
##
reboot_pkgs = "kernel kernel-smp kernel-xen-hypervisor kernel-PAE
kernel-xen0 kernel-xenU kernel-xen kernel-xen-guest glibc hal
dbus"
##
## Enable the TurboGears scheduler
##
tg.scheduler = True
##
## TGCaptcha widget settings
##
tgcaptcha.jpeg_generator = 'mcdermott'
tgcaptcha.key = 'Y`h`f&s}TZz'
# The commented out values below are the defaults
# VIEW
# which view (template engine) to use if one is not specified in the
# template name
# tg.defaultview = "kid"
# The following kid settings determine the settings used by the kid
serializer.
# One of (html|xml|json)
# kid.outputformat="html"
# kid.encoding="utf-8"
# The sitetemplate is used for overall styling of a site that
# includes multiple TurboGears applications
# tg.sitetemplate="<packagename.templates.templatename>"
# Allow every exposed function to be called as json,
# tg.allow_json = False
# List of Widgets to include on every page.
#tg.include_widgets = ['turbogears.mochikit']
# Set to True if the scheduler should be started
# tg.scheduler = False
# VISIT TRACKING
# Each visit to your application will be assigned a unique visit ID
tracked via
# a cookie sent to the visitor's browser.
# --------------
# Enable Visit tracking
visit.on=True
# Number of minutes a visit may be idle before it expires.
visit.timeout=720
# The name of the cookie to transmit to the visitor's browser.
# visit.cookie.name="tg-visit"
# Domain name to specify when setting the cookie (must begin with .
according to
# RFC 2109). The default (None) should work for most cases and will
default to
# the machine to which the request was made. NOTE: localhost is NEVER a
valid
# value and will NOT WORK.
# visit.cookie.domain=None
# Specific path for the cookie
# visit.cookie.path="/"
#visit.cookie.secure=True
# The name of the VisitManager plugin to use for visitor tracking.
visit.manager="sqlobject"
# Database class to use for visit tracking
visit.soprovider.model = "bodhi.model.Visit"
# IDENTITY
# General configuration of the TurboGears Identity management module
# --------
# Switch to turn on or off the Identity management module
identity.on=True
# [REQUIRED] URL to which CherryPy will internally redirect when an
access
# control check fails. If Identity management is turned on, a value for
this
# option must be specified.
identity.failure_url="/login"
#identity.provider='bugzilla'
# The names of the fields on the login form containing the visitor's
user ID
# and password. In addition, the submit button is specified simply so
its
# existence may be stripped out prior to passing the form data to the
target
# controller.
# identity.form.user_name="user_name"
# identity.form.password="password"
# identity.form.submit="login"
# What sources should the identity provider consider when determining
the
# identity associated with a request? Comma separated list of identity
sources.
# Valid sources: form, visit, http_auth
# identity.source="form,http_auth,visit"
# SqlObjectIdentityProvider
# Configuration options for the default IdentityProvider
# -------------------------
# The classes you wish to use for your Identity model. Remember to not
use reserved
# SQL keywords for class names (at least unless you specify a different
table
# name using sqlmeta).
identity.soprovider.model.user="bodhi.model.User"
identity.soprovider.model.group="bodhi.model.Group"
identity.soprovider.model.permission="bodhi.model.Permission"
identity.soprovider.model.visit="bodhi.model.VisitIdentity"
# The password encryption algorithm used when comparing passwords
against what's
# stored in the database. Valid values are 'md5' or 'sha1'. If you do
not
# specify an encryption algorithm, passwords are expected to be clear
text.
# The SqlObjectProvider *will* encrypt passwords supplied as part of
your login
# form. If you set the password through the password property, like:
# my_user.password = 'secret'
# the password will be encrypted in the database, provided identity is
up and
# running, or you have loaded the configuration specifying what
encryption to
# use (in situations where identity may not yet be running, like tests).
# identity.soprovider.encryption_algorithm=None
[/static]
static_filter.on = True
static_filter.dir = "%(top_level_dir)s/static"
[/favicon.ico]
static_filter.on = True
static_filter.file = "%(top_level_dir)s/static/images/favicon.ico"
----------------
Any help/pointers would be greatly appreciated....
Also, maybe if you could provide a little blurb on how the bodhi server
is architected it would help me conceptualize it better, the docs for
bodhi's server side config seem very very sparse.
Thanks
Brian Kosick
15 years, 7 months
2 commits - apache/bodhi.wsgi bodhi/controllers.py bodhi/metrics.py
by Luke Macken
apache/bodhi.wsgi | 2 +-
bodhi/controllers.py | 4 ++--
bodhi/metrics.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 543e7d718468a736386337da24b0e84504b6de81
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 29 17:17:04 2008 -0400
Fix some potential XSS issues.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 94b9a49..88442d5 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -874,7 +874,7 @@ class Root(controllers.RootController):
try:
update = PackageUpdate.byTitle(title)
except SQLObjectNotFound:
- flash_log("Update %s does not exist" % title)
+ flash_log("The specified update does not exist")
if tg_errors:
if tg_errors.has_key('text'):
flash_log("Please fill in all comment fields")
@@ -891,7 +891,7 @@ class Root(controllers.RootController):
values={'title':update.title, 'karma' : karma},
comment_form=self.comment_captcha_form)
elif karma not in (0, 1, -1):
- flash_log("Karma must be one of (1, 0, -1), not %s" % repr(karma))
+ flash_log("Karma must be one of (1, 0, -1)")
return dict(update=update, updates=[],
values={'title' : update.title},
comment_form=self.comment_captcha_form)
diff --git a/bodhi/metrics.py b/bodhi/metrics.py
index e2a7787..e612690 100644
--- a/bodhi/metrics.py
+++ b/bodhi/metrics.py
@@ -491,7 +491,7 @@ class MetricsController(Controller):
else:
rel = Release.byName(release)
except SQLObjectNotFound:
- flash("Unknown Release: %s" % release)
+ flash("Unknown Release")
raise redirect('/metrics')
widgets = MetricData().get_widgets(release)
if not widgets:
commit e756bb4a122270cbb1a23244ed8918b9e5afd3a0
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 29 16:59:42 2008 -0400
Disable the webpath in our wsgi app
diff --git a/apache/bodhi.wsgi b/apache/bodhi.wsgi
index 9795115..bd050c9 100644
--- a/apache/bodhi.wsgi
+++ b/apache/bodhi.wsgi
@@ -17,7 +17,7 @@ load_config()
turbogears.config.update({'global': {'server.environment': 'production'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': False}})
-turbogears.config.update({'global': {'server.webpath': '/updates'}})
+#turbogears.config.update({'global': {'server.webpath': '/updates'}})
from bodhi import jobs
turbogears.startup.call_on_startup.append(jobs.schedule)
15 years, 7 months
bodhi/tools
by Luke Macken
bodhi/tools/client.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 0bd0f5ada650863e13d7a07a85a614d867e01dca
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Sep 23 20:48:04 2008 -0400
Handle some bodhi client authentication issue a little better
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 56c6b1d..986b910 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -195,6 +195,11 @@ def main():
data = bodhi.push()
if not data:
log.error("The masher did not return anything :(")
+ raise AuthError
+ if not data.get('updates', None):
+ log.info(data.get('message', 'Unknown masher reply'))
+ raise AuthError
+ log.debug(data)
log.info("[ %d Pending Requests ]" % len(data['updates']))
for status in ('testing', 'stable', 'obsolete'):
updates = filter(lambda x: x['request'] == status,
15 years, 7 months
bodhi.spec
by Luke Macken
bodhi.spec | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 6d2a4b47ceb81dd849f1cb5564a87b095c513973
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Sep 16 13:58:31 2008 -0400
Make our python-fedora requirement explicit
diff --git a/bodhi.spec b/bodhi.spec
index 20de2b6..f223a4a 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -33,7 +33,8 @@ A modular piece of the Fedora Infrastructure stack
%package client
Summary: Bodhi Client
Group: Applications/Internet
-Requires: python-simplejson python-fedora koji yum
+Requires: python-simplejson koji yum
+Requires: python-fedora >= 0.3.5
%description client
Client tools for interacting with bodhi
@@ -111,6 +112,10 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* 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)
+
* Wed Sep 10 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.3-1
- Latest upstream release
15 years, 7 months
bodhi/masher.py
by Luke Macken
bodhi/masher.py | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit e54fa2689e8b7157438b967fdde97ac53bf5eecf
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Sep 16 12:04:58 2008 -0400
Add a debugging statement to the MashTask.send_testing_digests method to help track a bug down.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 30f7a11..97eb4c4 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -674,6 +674,9 @@ class MashTask(Thread):
# Add the detail of each build
for nvr in updlist:
maildata += u"\n" + self.testing_digest[prefix][nvr]
+ log.debug("mail.send_mail(%r, %r, %r, %r)" % (config.get('bodhi_email'),
+ config.get('test_announce_list'), '%s updates-testing report' % prefix.title(),
+ maildata))
mail.send_mail(config.get('bodhi_email'),
config.get('test_announce_list'),
'%s updates-testing report' % prefix.title(),
15 years, 7 months
bodhi/masher.py
by Luke Macken
bodhi/masher.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit b806c096471f0f6a5f8b52ed3b361fda6b53d85b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 15 20:30:40 2008 -0400
Apply a patch from Ricky Zhou to avoid creating '.newkey.newkey' directories :)
diff --git a/bodhi/masher.py b/bodhi/masher.py
index d62e995..30f7a11 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -449,7 +449,8 @@ class MashTask(Thread):
# HACK.
log.debug("Moving each arch to arch.newkey")
for arch in arches:
- shutil.move(join(newrepo, arch), join(newrepo, '%s.newkey' % arch))
+ if not arch.endswith('.newkey'):
+ shutil.move(join(newrepo, arch), join(newrepo, '%s.newkey' % arch))
arches = os.listdir(newrepo)
log.debug("Running sanity checks on %s" % newrepo)
15 years, 7 months
bodhi/admin.py
by Luke Macken
bodhi/admin.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 1fd0df69b4dc74e784b85077b554985d9a304c27
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Sep 13 19:40:53 2008 -0400
Allow for push requests without any updates (resuming)
diff --git a/bodhi/admin.py b/bodhi/admin.py
index c5b8b38..70f68a9 100644
--- a/bodhi/admin.py
+++ b/bodhi/admin.py
@@ -121,7 +121,7 @@ class AdminController(Controller, SecureResource):
@expose(allow_json=True)
@validate(validators={'resume' : validators.StringBool()})
- def mash(self, updates, resume=False, **kw):
+ def mash(self, updates=None, resume=False, **kw):
""" Mash a list of PackageUpdate objects.
If this instance is deployed with a remote masher, then it simply
@@ -130,6 +130,8 @@ class AdminController(Controller, SecureResource):
handling all of the update requests, composing fresh repositories,
generating and sending update notices, closing bugs, etc.
"""
+ if not updates:
+ updates = []
if not isinstance(updates, list):
if isinstance(updates, basestring):
updates = simplejson.loads(updates.replace("u'", "\"").replace("'", "\""))
15 years, 7 months
2 commits - bodhi.egg-info/PKG-INFO bodhi/release.py bodhi.spec bodhi/tools
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.spec | 7 +++++--
bodhi/release.py | 2 +-
bodhi/tools/clean-testing.py | 18 ++++++++++--------
bodhi/tools/client.py | 2 ++
bodhi/tools/tagcheck.py | 11 +++++++----
6 files changed, 26 insertions(+), 16 deletions(-)
New commits:
commit c01cc71b40b8f847f17ea2e647a6c0e6c520e4fb
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 11 14:55:23 2008 -0400
Fix some various issues with some of our tools
diff --git a/bodhi/tools/clean-testing.py b/bodhi/tools/clean-testing.py
index 29d2343..316df82 100755
--- a/bodhi/tools/clean-testing.py
+++ b/bodhi/tools/clean-testing.py
@@ -13,6 +13,7 @@ import turbogears
from sqlobject import SQLObjectNotFound
from turbogears.database import PackageHub
+from bodhi.util import load_config
from bodhi.model import Release, PackageBuild
from bodhi.buildsys import get_session
@@ -40,15 +41,16 @@ def clean_testing_builds(untag=False):
stable_build['nvr'])
try:
build = PackageBuild.byNvr(testing_build['nvr'])
- if build.update.status != 'testing':
- print "%s not testing in bodhi!" % build.update
- raise SQLObjectNotFound
- else:
- if untag:
- print "Obsoleting via bodhi"
- build.update.obsolete(newer=stable_build['nvr'])
+ for update in build.updates:
+ if update.status != 'testing':
+ print "%s not testing in bodhi!" % update.title
+ raise SQLObjectNotFound
else:
- print "Need to obsolete via bodhi"
+ if untag:
+ print "Obsoleting via bodhi"
+ update.obsolete(newer=stable_build['nvr'])
+ else:
+ print "Need to obsolete via bodhi"
except SQLObjectNotFound:
if untag:
print "Untagging via koji"
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index b8ef32e..56c6b1d 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -193,6 +193,8 @@ def main():
log.info(data['tg_flash'])
elif opts.push:
data = bodhi.push()
+ if not data:
+ log.error("The masher did not return anything :(")
log.info("[ %d Pending Requests ]" % len(data['updates']))
for status in ('testing', 'stable', 'obsolete'):
updates = filter(lambda x: x['request'] == status,
diff --git a/bodhi/tools/tagcheck.py b/bodhi/tools/tagcheck.py
index 24d2bf6..2fb14a8 100755
--- a/bodhi/tools/tagcheck.py
+++ b/bodhi/tools/tagcheck.py
@@ -25,11 +25,14 @@ def main():
except SQLObjectNotFound:
print "PackageUpdate(%s) not found!" % nvr
continue
- if not build.update:
- print "PackageBuild(%s) has no update" % (build.nvr)
+ if not len(build.updates):
+ print "PackageBuild(%s) has no updates" % (build.nvr)
status = 'testing' in tag and 'testing' or 'stable'
- if build.update.status != status:
- print "%s is not tagged as %s in koji" % (build.nvr, status)
+ 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)
if __name__ == '__main__':
main()
commit 41c466f7a737856a9ce139f6b7df23fae109641f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 11 14:55:03 2008 -0400
0.5.3 release
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index b6fb5e0..042be39 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.2
+Version: 0.5.3
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 995962a..20de2b6 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.2
-Release: 27%{?dist}
+Version: 0.5.3
+Release: 3%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -111,6 +111,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Wed Sep 10 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.3-1
+- Latest upstream release
+
* Wed Sep 03 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.2-2
- Add the masher deps to BuildRequires, since it now resides
on the turbogears.extensions entry point and will be
diff --git a/bodhi/release.py b/bodhi/release.py
index 5d5b45d..00edd50 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.2'
+VERSION = '0.5.3'
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
7 commits - bodhi/admin.py bodhi/jobs.py bodhi.spec bodhi/tests
by Luke Macken
bodhi.spec | 7 ++++---
bodhi/admin.py | 24 ++++++++++++++++++------
bodhi/jobs.py | 5 +++--
bodhi/tests/test_controllers.py | 9 ++++++---
4 files changed, 31 insertions(+), 14 deletions(-)
New commits:
commit 45e26b9f8513ff29eba3b37b97597e7197524fd4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:51:33 2008 -0400
Fix our test_admin_push unit test
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index b0bd843..9bef400 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -36,7 +36,7 @@ def login(username='guest', display_name='guest', group=None):
except DuplicateEntryError:
guest = User.by_user_name(username)
testutil.create_request('/updates/login?tg_format=json&login=Login&forward_url=/updates/&user_name=%s&password=guest' % username, method='POST')
- assert cherrypy.response.status == '200 OK'
+ assert cherrypy.response.status == '200 OK', cherrypy.response.body[0]
cookies = filter(lambda x: x[0] == 'Set-Cookie',
cherrypy.response.header_list)
cookiehdr = cookies[0][1].strip()
@@ -991,8 +991,11 @@ class TestControllers(testutil.DBTest):
headers=session)
# It should now appear in the queue
+ config.update({'global': {'masher': None}})
+ testutil.capture_log(['bodhi.controllers', 'bodhi.admin', 'bodhi.masher', 'bodhi.util'])
testutil.create_request('/updates/admin/push', headers=session)
- assert '1 pending request' in cherrypy.response.body[0]
+ testutil.print_log()
+ assert '1 pending request' in cherrypy.response.body[0], cherrypy.response.body[0]
# Revoke the stable request from the update
testutil.create_request('/updates/revoke/%s' % params['builds'],
@@ -1005,7 +1008,7 @@ class TestControllers(testutil.DBTest):
# Create a MASHING lock with this update in it
config.update({'global': {'mashed_dir': os.getcwd()}})
mash_lock = file(os.path.join(config.get('mashed_dir'), 'MASHING'), 'w')
- mash_lock.write(pickle.dumps([params['builds'],]))
+ mash_lock.write(pickle.dumps({'updates': [params['builds'],], 'repos': []}))
mash_lock.close()
# Make sure it attempts to resume the current push
commit be93c71a907ac34528bd4fceabc35e3f2bf776a7
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:51:16 2008 -0400
Refactor our current_mash methods
diff --git a/bodhi/admin.py b/bodhi/admin.py
index 2cc81d2..c5b8b38 100644
--- a/bodhi/admin.py
+++ b/bodhi/admin.py
@@ -152,12 +152,10 @@ class AdminController(Controller, SecureResource):
raise redirect('/admin/masher')
def _current_mash(self):
- """ Get the update list for the current mash """
- return self._masher_request('/admin/current_mash')
-
- @expose(allow_json=True)
- def current_mash(self):
""" Return details about the mash in process """
+ if config.get('masher', None):
+ return self._masher_request('/admin/current_mash')
+
from bodhi.masher import masher
mash_data = {'mashing': False, 'updates': []}
mashed_dir = config.get('mashed_dir')
@@ -167,9 +165,18 @@ class AdminController(Controller, SecureResource):
mash_state = pickle.load(mash_lock)
mash_lock.close()
mash_data['mashing'] = masher.mashing
+ log.debug('mash_state = %s' % repr(mash_state))
mash_data['updates'] = mash_state['updates']
return mash_data
+ @expose(allow_json=True)
+ def current_mash(self):
+ """ Return details about the mash in process """
+ return self._current_mash()
+
+ def _get_mash_status(self):
+ """ Return details about the mash in process """
+
def _masher_request(self, method, **kwargs):
"""
Call a remote method on the masher with any other arguments.
commit 518ed78ec6d2f2d91f490a2b11a3b65a768d2457
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:17:45 2008 -0400
Increase our refresh_metrics initialdelay
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index 9f63c4c..7192054 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -129,7 +129,6 @@ def cache_release_data():
log.info("Release cache complete")
-
def refresh_metrics():
""" Refresh all of our graphs and metrics """
from bodhi.metrics import MetricData
@@ -180,5 +179,5 @@ def schedule():
log.debug("Scheduling refresh_metrics job")
scheduler.add_interval_task(action=refresh_metrics,
taskname='Refresh our metrics',
- initialdelay=1200,
+ initialdelay=7200,
interval=172800)
commit cc9e33942e2c8afea83aa0e1ce253324af65c757
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:17:17 2008 -0400
Skip our repodata cache in the clean_repos job
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index ae37db3..9f63c4c 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -48,6 +48,8 @@ def clean_repo():
for repo in [release + '-updates', release + '-updates-testing']:
liverepos.append(dirname(realpath(join(repos, repo))))
for repo in [join(repos, repo) for repo in os.listdir(repos)]:
+ if 'repodata' in repo: # skip our repodata caches
+ continue
if not islink(repo) and isdir(repo):
fullpath = realpath(repo)
if fullpath not in liverepos:
commit 1592a90b6972bdfe0507b5a4bd75e59cc6d3992a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:05:58 2008 -0400
Detect when a masher exception has occured
diff --git a/bodhi/admin.py b/bodhi/admin.py
index 254347f..2cc81d2 100644
--- a/bodhi/admin.py
+++ b/bodhi/admin.py
@@ -93,6 +93,9 @@ class AdminController(Controller, SecureResource):
updates = []
resume = False
mash = self._current_mash()
+ if not mash:
+ flash_log("A masher exception has occured.")
+ return dict(updates=[], resume=False)
if mash['mashing']:
flash_log('The masher is currently pushing updates')
else:
commit b86ff03538d000ad6a8fe6696fd625dd838dbccd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:05:38 2008 -0400
Attach a StringBool validator to the resume argument of the mash method.
diff --git a/bodhi/admin.py b/bodhi/admin.py
index 4d9baa5..254347f 100644
--- a/bodhi/admin.py
+++ b/bodhi/admin.py
@@ -22,7 +22,8 @@ import cPickle as pickle
from os.path import join, exists
from Cookie import SimpleCookie
from sqlobject import SQLObjectNotFound
-from turbogears import expose, identity, redirect, flash, config
+from formencode import validators
+from turbogears import expose, identity, redirect, flash, config, validate
from turbogears.identity import SecureResource
from turbogears.controllers import Controller
@@ -116,6 +117,7 @@ class AdminController(Controller, SecureResource):
return dict(updates=updates, resume=resume)
@expose(allow_json=True)
+ @validate(validators={'resume' : validators.StringBool()})
def mash(self, updates, resume=False, **kw):
""" Mash a list of PackageUpdate objects.
commit d92fd7737d5a630501da707c56636009d8547b7f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 10 22:03:59 2008 -0400
Bump spec rev for infrastructure releases. Add BuildRequires for the masher extension.
diff --git a/bodhi.spec b/bodhi.spec
index 34aca07..995962a 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -3,7 +3,7 @@
Name: bodhi
Version: 0.5.2
-Release: 11%{?dist}
+Release: 27%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -15,9 +15,10 @@ BuildArch: noarch
BuildRequires: python-setuptools
BuildRequires: python-setuptools-devel
-BuildRequires: python-fedora python-TurboMail TurboGears yum
BuildRequires: python-devel
-BuildRequires: TurboGears
+
+BuildRequires: TurboGears python-bugzilla
+BuildRequires: python-fedora python-TurboMail TurboGears yum koji
%description
Bodhi is a web application that facilitates the process of publishing
15 years, 7 months