2 commits - bodhi.egg-info/PKG-INFO bodhi/release.py bodhi.spec bodhi/util.py
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.spec | 5 ++++-
bodhi/release.py | 2 +-
bodhi/util.py | 4 ++--
4 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit ad26c8555e2bd9ade9209fa8b54ca019bf6d694e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jun 24 00:15:57 2009 -0400
Fix some problems with the updateinfo sanity checking code
diff --git a/bodhi/util.py b/bodhi/util.py
index 1d9b0e3..41f8fee 100644
--- a/bodhi/util.py
+++ b/bodhi/util.py
@@ -419,8 +419,8 @@ def sanity_check_repodata(myurl):
updateinfo = os.path.join(myurl, 'updateinfo.xml.gz')
if os.path.exists(updateinfo):
- ret = subprocess.call(['zgrep', '<id/>', 'updateinfo.xml.gz'])
- if not retcode:
+ ret = subprocess.call(['zgrep', '<id/>', updateinfo])
+ if not ret:
raise RepodataException('updateinfo.xml.gz contains empty ID tags')
commit 63eb25c0a32e6604267d9d59d535f391666ce02b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jun 22 10:17:03 2009 -0400
0.5.27
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 57bfce8..5875b37 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.26
+Version: 0.5.27
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 8e1a812..2301709 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.26
+Version: 0.5.27
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -114,6 +114,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Mon Jun 22 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.27-01
+- Latest upstream release to bring in fixed mash config files.
+
* Fri Jun 12 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.26-1
- Latest upstream release with a variety of fixes and pkgdb-0.4 support.
diff --git a/bodhi/release.py b/bodhi/release.py
index d84c89e..06ab5e2 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.26'
+VERSION = '0.5.27'
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, 10 months
bodhi/config
by Luke Macken
bodhi/config/f11-updates-testing.mash | 2 +-
bodhi/config/f11-updates.mash | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 8b791aefb37347bd60eac08f17fb3aae3da1c2ee
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jun 22 10:15:12 2009 -0400
Set the f11-updates delta_dirs to point to F11 final and the latest updates.
https://fedorahosted.org/rel-eng/ticket/1938
diff --git a/bodhi/config/f11-updates-testing.mash b/bodhi/config/f11-updates-testing.mash
index aaf3d51..72289e0 100644
--- a/bodhi/config/f11-updates-testing.mash
+++ b/bodhi/config/f11-updates-testing.mash
@@ -14,4 +14,4 @@ repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/testing
repoviewtitle = "Fedora 11 Updates Testing - %(arch)s"
arches = i386 x86_64 ppc ppc64
delta = True
-delta_dirs = /mnt/koji/mash/rawhide
+delta_dirs = /pub/fedora/linux/releases/11/Everything,/mnt/koji/mash/updates/f11-updates
diff --git a/bodhi/config/f11-updates.mash b/bodhi/config/f11-updates.mash
index 7e5beaf..3f6a00f 100644
--- a/bodhi/config/f11-updates.mash
+++ b/bodhi/config/f11-updates.mash
@@ -14,4 +14,4 @@ repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/11/%(ar
repoviewtitle = "Fedora 11 Updates - %(arch)s"
arches = i386 x86_64 ppc ppc64
delta = True
-delta_dirs = /mnt/koji/mash/rawhide
+delta_dirs = /pub/fedora/linux/releases/11/Everything,/mnt/koji/mash/updates/f11-updates
14 years, 10 months
bodhi/config
by Luke Macken
bodhi/config/app.cfg | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 34939b7acfaae1fe831adc6ce0d57b9b770b6d9a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jun 12 18:03:50 2009 -0400
Add an optional tgcaptcha.controller configuration
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 728a150..50a434c 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -140,6 +140,7 @@ tg.scheduler = True
##
tgcaptcha.jpeg_generator = 'mcdermott'
tgcaptcha.key = 'Y`h`f&s}TZz'
+#tgcaptcha.controller = '/updates/captcha'
# The commented out values below are the defaults
14 years, 10 months
bodhi.egg-info/PKG-INFO bodhi/release.py bodhi.spec
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.spec | 5 ++++-
bodhi/release.py | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 690345acf79f8fe8b2ce332225ea5eff832710c2
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jun 12 14:18:05 2009 -0400
0.5.26
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 70a9487..57bfce8 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.25
+Version: 0.5.26
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 5b3860d..8e1a812 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.25
+Version: 0.5.26
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -114,6 +114,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Fri Jun 12 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.26-1
+- Latest upstream release with a variety of fixes and pkgdb-0.4 support.
+
* Tue May 12 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.25-1
- Latest upstream bugfix release to work around some TG 1.0.8
brokenness, and make our masher a bit more robust.
diff --git a/bodhi/release.py b/bodhi/release.py
index 50a9347..d84c89e 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.25'
+VERSION = '0.5.26'
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, 10 months
bodhi/util.py
by Luke Macken
bodhi/util.py | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
New commits:
commit 4306df6ac6479a1278b746250c139b17de8be8e3
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jun 12 14:10:07 2009 -0400
Apply a patch from Toshio to get bodhi to work with pkgdb-0.4 API (#319)
diff --git a/bodhi/util.py b/bodhi/util.py
index 9eec059..1d9b0e3 100644
--- a/bodhi/util.py
+++ b/bodhi/util.py
@@ -35,6 +35,7 @@ from datetime import datetime
from decorator import decorator
from turbogears import config, url, flash, redirect
from fedora.tg.util import request_format
+from fedora.client import PackageDB
from bodhi.exceptions import (RPMNotFound, RepodataException,
InvalidUpdateException)
@@ -237,34 +238,32 @@ def get_pkg_pushers(pkgName, collectionName='Fedora', collectionVersion='devel')
* ['status']['translations'] may one day contain more than the 'C'
translation. The pkgdb will have to figure out how to deal with that
if so.
+
+ This may raise: fedora.client.AppError if there's an error talking to the
+ PackageDB (for instance, no such package)
"""
if config.get('acl_system') == 'dummy':
return (['guest'], ['guest']), (['guest'], ['guest'])
- pkgPage = None
- pkgPage = urllib2.urlopen(config.get('pkgdb_url') +
- '/packages/name/%s/%s/%s?tg_format=json' % (
- pkgName, collectionName, collectionVersion))
-
- pkg = simplejson.load(pkgPage)
- if pkg.has_key('status') and not pkg['status']:
- raise Exception, 'Package %s not found in PackageDB. Error: %s' % (
- pkgName, pkg['message'])
+ pkgdb = PackageDB(config.get('pkgdb_url'))
+ # Note if AppError is raised (for no pkgNamme or other server errors) we
+ # do not catch the exception here.
+ pkg = pkgdb.get_owners(pkgName, collectionName, collectionVersion)
# Owner is allowed to commit and gets notified of pushes
# This will always be the 0th element as we'll retrieve at most one
# value for any given Package-Collection-Version
- pNotify = [pkg['packageListings'][0]['owneruser']]
+ pNotify = [pkg.packageListings[0]['owner']]
pAllowed = [pNotify[0]]
# Find other people in the acl
for person in pkg['packageListings'][0]['people']:
if person['aclOrder']['watchcommits'] and \
pkg['statusMap'][str(person['aclOrder']['watchcommits']['statuscode'])] == 'Approved':
- pNotify.append(person['user'])
+ pNotify.append(person['username'])
if person['aclOrder']['commit'] and \
pkg['statusMap'][str(person['aclOrder']['commit']['statuscode'])] == 'Approved':
- pAllowed.append(person['user'])
+ pAllowed.append(person['username'])
# Find groups that can push
gNotify = []
@@ -272,10 +271,10 @@ def get_pkg_pushers(pkgName, collectionName='Fedora', collectionVersion='devel')
for group in pkg['packageListings'][0]['groups']:
if group['aclOrder']['watchcommits'] and \
pkg['statusMap'][str(group['aclOrder']['watchcommits']['statuscode'])] == 'Approved':
- gNotify.append(group['name'])
+ gNotify.append(group['groupname'])
if group['aclOrder']['commit'] and \
pkg['statusMap'][str(group['aclOrder']['commit']['statuscode'])] == 'Approved':
- gAllowed.append(group['name'])
+ gAllowed.append(group['groupname'])
return ((pAllowed, pNotify), (gAllowed, gNotify))
14 years, 10 months
bodhi/exceptions.py bodhi/modifyrepo.py
by Luke Macken
bodhi/exceptions.py | 4 --
bodhi/modifyrepo.py | 98 ++++++++++++++++++----------------------------------
2 files changed, 36 insertions(+), 66 deletions(-)
New commits:
commit 3f3e491738e65423696274a94dfd4e482f67fa72
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jun 8 14:41:38 2009 -0400
Revert "Apply a patch from Seth Vidal to update our modifyrepo from upstream."
This reverts commit 0355c0932ae1aeb6a21eebc09f7a0592fd338d76.
Ideally, we should be using the global upstream modifyrepo, but this patch
breaks some unit tests. We'll do this the Right Way in the future, but
for now lets not break things too hard.
diff --git a/bodhi/exceptions.py b/bodhi/exceptions.py
index 6d0e17f..f6c1607 100644
--- a/bodhi/exceptions.py
+++ b/bodhi/exceptions.py
@@ -12,8 +12,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-from createrepo.utils import MDError
-
class BodhiException(Exception):
pass
@@ -29,7 +27,7 @@ class RPMNotFound(BodhiException):
class RepositoryLocked(BodhiException):
pass
-class RepositoryNotFound(MDError):
+class RepositoryNotFound(BodhiException):
pass
class InvalidRequest(BodhiException):
diff --git a/bodhi/modifyrepo.py b/bodhi/modifyrepo.py
index bbf938d..e8593ec 100644
--- a/bodhi/modifyrepo.py
+++ b/bodhi/modifyrepo.py
@@ -1,4 +1,5 @@
-#!/usr/bin/env python
+# $Id: modifyrepo.py,v 1.1 2006/12/07 07:19:41 lmacken Exp $
+#
# This tools is used to insert arbitrary metadata into an RPM repository.
# Example:
# ./modifyrepo.py updateinfo.xml myrepo/repodata
@@ -17,18 +18,19 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-# (C) Copyright 2006 Red Hat, Inc.
# Luke Macken <lmacken(a)redhat.com>
-# modified by Seth Vidal 2008
+
+"""
+ This tool is in CVS HEAD of createrepo
+"""
import os
import sys
-
-from createrepo.utils import checksum_and_rename, GzipFile, MDError
-from yum.misc import checksum
+import sha
+import gzip
from xml.dom import minidom
-
+from bodhi.exceptions import RepositoryNotFound
class RepoMetadata:
@@ -36,15 +38,12 @@ class RepoMetadata:
""" Parses the repomd.xml file existing in the given repo directory. """
self.repodir = os.path.abspath(repo)
self.repomdxml = os.path.join(self.repodir, 'repomd.xml')
- self.checksum_type = 'sha256'
if not os.path.exists(self.repomdxml):
- raise MDError, '%s not found' % self.repomdxml
+ raise RepositoryNotFound, self.repomdxml
self.doc = minidom.parse(self.repomdxml)
- def _insert_element(self, parent, name, attrs=None, text=None):
+ def _insert_element(self, parent, name, attrs={}, text=None):
child = self.doc.createElement(name)
- if not attrs:
- attrs = {}
for item in attrs.items():
child.setAttribute(item[0], item[1])
if text:
@@ -60,79 +59,60 @@ class RepoMetadata:
"""
md = None
if not metadata:
- raise MDError, 'metadata cannot be None'
+ raise Exception('metadata cannot be None')
if isinstance(metadata, minidom.Document):
md = metadata.toxml()
mdname = 'updateinfo.xml'
elif isinstance(metadata, str):
if os.path.exists(metadata):
- if metadata.endswith('.gz'):
- oldmd = GzipFile(filename=metadata, mode='rb')
- else:
- oldmd = file(metadata, 'r')
+ oldmd = file(metadata, 'r')
md = oldmd.read()
oldmd.close()
mdname = os.path.basename(metadata)
else:
- raise MDError, '%s not found' % metadata
+ raise Exception('%s not found' % metadata)
else:
- raise MDError, 'invalid metadata type'
+ raise Exception('invalid metadata type')
## Compress the metadata and move it into the repodata
- if not mdname.endswith('.gz'):
- mdname += '.gz'
+ mdname += '.gz'
mdtype = mdname.split('.')[0]
destmd = os.path.join(self.repodir, mdname)
- newmd = GzipFile(filename=destmd, mode='wb')
- newmd.write(md)
+ newmd = gzip.GzipFile(destmd, 'wb')
+ newmd.write(md.encode('utf-8'))
newmd.close()
print "Wrote:", destmd
- open_csum = checksum(self.checksum_type, metadata)
-
-
- csum, destmd = checksum_and_rename(destmd, self.checksum_type)
- base_destmd = os.path.basename(destmd)
-
+ ## Read the gzipped metadata
+ f = file(destmd, 'r')
+ newmd = f.read()
+ f.close()
## Remove any stale metadata
for elem in self.doc.getElementsByTagName('data'):
if elem.attributes['type'].value == mdtype:
- self.doc.firstChild.removeChild(elem)
-
+ self.doc.firstChild.removeChild(elem)
## Build the metadata
root = self.doc.firstChild
- root.appendChild(self.doc.createTextNode(" "))
data = self._insert_element(root, 'data', attrs={ 'type' : mdtype })
- data.appendChild(self.doc.createTextNode("\n "))
-
self._insert_element(data, 'location',
- attrs={ 'href' : 'repodata/' + base_destmd })
- data.appendChild(self.doc.createTextNode("\n "))
- self._insert_element(data, 'checksum',
- attrs={ 'type' : self.checksum_type },
- text=csum)
- data.appendChild(self.doc.createTextNode("\n "))
+ attrs={ 'href' : 'repodata/' + mdname })
+ self._insert_element(data, 'checksum', attrs={ 'type' : 'sha' },
+ text=sha.new(newmd).hexdigest())
self._insert_element(data, 'timestamp',
text=str(os.stat(destmd).st_mtime))
- data.appendChild(self.doc.createTextNode("\n "))
- self._insert_element(data, 'open-checksum',
- attrs={ 'type' : self.checksum_type },
- text=open_csum)
-
- data.appendChild(self.doc.createTextNode("\n "))
- root.appendChild(self.doc.createTextNode("\n"))
+ self._insert_element(data, 'open-checksum', attrs={ 'type' : 'sha' },
+ text=sha.new(md.encode('utf-8')).hexdigest())
- print " type =", mdtype
- print " location =", 'repodata/' + mdname
- print " checksum =", csum
- print " timestamp =", str(os.stat(destmd).st_mtime)
- print " open-checksum =", open_csum
+ #print " type =", mdtype
+ #print " location =", 'repodata/' + mdname
+ #print " checksum =", sha.new(newmd).hexdigest()
+ #print " timestamp =", str(os.stat(destmd).st_mtime)
+ #print " open-checksum =", sha.new(md).hexdigest()
## Write the updated repomd.xml
outmd = file(self.repomdxml, 'w')
self.doc.writexml(outmd)
- outmd.write("\n")
outmd.close()
print "Wrote:", self.repomdxml
@@ -141,14 +121,6 @@ if __name__ == '__main__':
if len(sys.argv) != 3 or '-h' in sys.argv:
print "Usage: %s <input metadata> <output repodata>" % sys.argv[0]
sys.exit()
- try:
- repomd = RepoMetadata(sys.argv[2])
- except MDError, e:
- print "Could not access repository: %s" % str(e)
- sys.exit(1)
- try:
- repomd.add(sys.argv[1])
- except MDError, e:
- print "Could not add metadata from file %s: %s" % (sys.argv[1], str(e))
- sys.exit(1)
+ repomd = RepoMetadata(sys.argv[2])
+ repomd.add(sys.argv[1])
14 years, 10 months
bodhi/metadata.py
by Luke Macken
bodhi/metadata.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 0a78f7b127cb4ffc2af7db43ad4549b507a7b2f5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jun 5 21:08:54 2009 -0400
Ensure we only add updates that have an updateid to the metadata
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index d130ae6..bb487e2 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -59,7 +59,7 @@ class ExtendedMetadata:
break
# Add all relevant notices from the metadata to this document
- ids = [update.updateid for update in self.updates]
+ ids = [update.updateid for update in self.updates if update.updateid]
for notice in umd.get_notices():
if notice['update_id'] in ids:
self._add_notice(notice)
@@ -216,7 +216,6 @@ class ExtendedMetadata:
try:
kojiBuild = self.builds[build.nvr]
except:
- log.error("Can't find cached kojiBuild for %s" % build.nvr)
kojiBuild = self.koji.getBuild(build.nvr)
rpms = self.koji.listBuildRPMs(kojiBuild['id'])
for rpm in rpms:
14 years, 10 months
bodhi/metadata.py
by Luke Macken
bodhi/metadata.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 9d740deb796165a3d7c25244faef77545abf5c13
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jun 5 21:07:00 2009 -0400
Only add testing/stable updates to the updateinfo (not obsolete ones)
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index b4fb953..d130ae6 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -84,7 +84,9 @@ class ExtendedMetadata:
self.builds[build['nvr']] = build
try:
b = PackageBuild.byNvr(build['nvr'])
- map(self.updates.add, b.updates)
+ for update in b.updates:
+ if update.status in ('testing', 'stable'):
+ self.updates.add(update)
except SQLObjectNotFound, e:
log.warning(e)
14 years, 10 months