bodhi.egg-info/PKG-INFO | 2 +- bodhi.spec | 7 +++++-- bodhi/config/app.cfg | 2 ++ bodhi/controllers.py | 37 ++++++++++++++++++------------------- bodhi/mail.py | 34 ++++++++++++++++++++++++++++++++-- bodhi/masher.py | 35 ++++++++++++++++------------------- bodhi/model.py | 35 +++++++++++++++++++++++++++-------- bodhi/release.py | 2 +- 8 files changed, 102 insertions(+), 52 deletions(-)
New commits: commit 9b0e50d40e0ee3896f03f29e527428e14c2bb725 Merge: 18e2524... ad26c85... Author: Luke Macken lmacken@redhat.com Date: Fri Jul 3 18:20:57 2009 -0400
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/bodhi
Conflicts: bodhi.egg-info/PKG-INFO bodhi.spec bodhi/release.py
diff --cc bodhi.spec index f5e00e4,2301709..4c3e1ba --- a/bodhi.spec +++ b/bodhi.spec @@@ -114,9 -114,9 +114,12 @@@ rm -rf bodhi/tests bodhi/tools/test-bod
%changelog +* Thu Jul 02 2009 Luke Macken lmacken@redhat.com - 0.6.0-0.1.beta +- 0.6.0 beta + + * Mon Jun 22 2009 Luke Macken lmacken@redhat.com - 0.5.27-01 + - Latest upstream release to bring in fixed mash config files. + * Fri Jun 12 2009 Luke Macken lmacken@redhat.com - 0.5.26-1 - Latest upstream release with a variety of fixes and pkgdb-0.4 support.
commit 18e252456dfec70911fa31e4dc846ab45b51c18d Author: Luke Macken lmacken@redhat.com Date: Fri Jul 3 18:14:07 2009 -0400
Revert "Update our fake buildsystem for some basic EPEL5 tests" This breaks our test cases, and is no longer necessary since I've tested EPEL in production already
This reverts commit bdc2e8932a769bb3a3f36d1c188e2e93fe78e216.
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py index 184b425..cc2d750 100644 --- a/bodhi/buildsys.py +++ b/bodhi/buildsys.py @@ -88,18 +88,18 @@ class DevBuildsys(Buildsystem): 'creation_time': '2007-08-24 19:38:29.422344', 'epoch': None, 'id': 16058, - 'name': 'python-stomper', - 'nvr': 'python-stomper-0.2.2-8.el5', + 'name': 'TurboGears', + 'nvr': 'TurboGears-1.0.2.2-2.fc8', 'owner_id': 388, 'owner_name': 'lmacken', 'package_id': 8, - 'package_name': 'python-stomper', - 'release': '8.el5', + 'package_name': 'TurboGears', + 'release': '2.fc8', 'state': 1, 'tag_id': 19, - 'tag_name': 'dist-5E-epel-testing-candidate', + 'tag_name': 'dist-f8-updates-testing', 'task_id': 127621, - 'version': '0.2.2'} + 'version': '1.0.2.2'}
def listBuildRPMs(self, *args, **kw): return [{'arch': 'src',
commit 920bfc2bc0125662089cdca612a65fa909050949 Author: Luke Macken lmacken@redhat.com Date: Fri Jul 3 17:32:46 2009 -0400
Update our spec for beta2
diff --git a/bodhi.spec b/bodhi.spec index 6692a70..f5e00e4 100644 --- a/bodhi.spec +++ b/bodhi.spec @@ -3,7 +3,7 @@
Name: bodhi Version: 0.6.0 -Release: 0.1.beta%{?dist} +Release: 0.2.beta%{?dist} Summary: A modular framework that facilitates publishing software updates Group: Applications/Internet License: GPLv2+
commit bdc2e8932a769bb3a3f36d1c188e2e93fe78e216 Author: Luke Macken lmacken@redhat.com Date: Fri Jul 3 17:30:27 2009 -0400
Update our fake buildsystem for some basic EPEL5 tests
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py index cc2d750..184b425 100644 --- a/bodhi/buildsys.py +++ b/bodhi/buildsys.py @@ -88,18 +88,18 @@ class DevBuildsys(Buildsystem): 'creation_time': '2007-08-24 19:38:29.422344', 'epoch': None, 'id': 16058, - 'name': 'TurboGears', - 'nvr': 'TurboGears-1.0.2.2-2.fc8', + 'name': 'python-stomper', + 'nvr': 'python-stomper-0.2.2-8.el5', 'owner_id': 388, 'owner_name': 'lmacken', 'package_id': 8, - 'package_name': 'TurboGears', - 'release': '2.fc8', + 'package_name': 'python-stomper', + 'release': '8.el5', 'state': 1, 'tag_id': 19, - 'tag_name': 'dist-f8-updates-testing', + 'tag_name': 'dist-5E-epel-testing-candidate', 'task_id': 127621, - 'version': '1.0.2.2'} + 'version': '0.2.2'}
def listBuildRPMs(self, *args, **kw): return [{'arch': 'src',
commit 9d3a2a64e29cc7924703e4fbe1f6b04ae6cb9f28 Author: Luke Macken lmacken@redhat.com Date: Thu Jul 2 14:36:43 2009 -0400
Add fedora_epel_{,test}_announce_list options to our app.cfg
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg index 50a434c..8d6b701 100644 --- a/bodhi/config/app.cfg +++ b/bodhi/config/app.cfg @@ -77,6 +77,8 @@ admin_groups = 'releng security_respons cvsadmin' # These variables should be named per: Release.prefix_id.lower()_announce_list fedora_announce_list = None fedora_test_announce_list = None +fedora_epel_announce_list = None +fedora_epel_test_announce_list = None
## ## TurboMail settings
commit 033f964d476df130a623145868270b419daf7f51 Author: Luke Macken lmacken@redhat.com Date: Thu Jul 2 12:03:25 2009 -0400
Remove a stray decorator
diff --git a/bodhi/model.py b/bodhi/model.py index 701699f..93cdc19 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -65,8 +65,6 @@ class Release(SQLObject): return '%s-updates-candidate' % self.dist_tag
@property - - @property def testing_tag(self): return '%s-testing' % self.dist_tag
commit 6b8738b5138f858cb855d7ab68a73d71569dee2d Author: Luke Macken lmacken@redhat.com Date: Thu Jul 2 10:41:24 2009 -0400
0.6.0 beta1
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO index 57bfce8..54277a7 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.6.0 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..6692a70 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.26 -Release: 1%{?dist} +Version: 0.6.0 +Release: 0.1.beta%{?dist} Summary: A modular framework that facilitates publishing software updates Group: Applications/Internet License: GPLv2+ @@ -114,6 +114,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog +* Thu Jul 02 2009 Luke Macken lmacken@redhat.com - 0.6.0-0.1.beta +- 0.6.0 beta + * Fri Jun 12 2009 Luke Macken lmacken@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..1ef092c 100644 --- a/bodhi/release.py +++ b/bodhi/release.py @@ -1,4 +1,4 @@ -VERSION = '0.5.26' +VERSION = '0.6.0' 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'
commit 2be7d4cc7e7fb44f801591dfe73ade84e02e7a65 Author: Luke Macken lmacken@redhat.com Date: Tue Jun 23 12:07:25 2009 -0400
Lots of refactoring to try and support other releases, such as Fedora EPEL.
- No database schema changes - Add a few new @properties to the Release model to get the appropriate stable/candidate/testing tags for various releases - Change the mail.get_template API a little bit to accept a string for use_template instead of the template itself. - Make our tag checking code a bit more generic
diff --git a/bodhi/controllers.py b/bodhi/controllers.py index 10a68bb..00f4b37 100644 --- a/bodhi/controllers.py +++ b/bodhi/controllers.py @@ -601,20 +601,21 @@ class Root(controllers.RootController):
# Determine which release this build is a candidate for for tag in tags: - dist = tag.split('-updates-candidate') - if len(dist) == 2: # candidate tag - rel = Release.selectBy(dist_tag=dist[0]) - if rel.count(): - rel = rel[0] - log.debug("Adding %s for %s" % (rel.name, build)) - if not releases.has_key(rel): - releases[rel] = [] - if build not in releases[rel]: - releases[rel].append(build) - buildinfo[build]['releases'].add(rel) - valid = True - else: - log.error("Cannot find release for %s" % dist[0]) + rel = None + for r in Release.select(): + if tag == r.candidate_tag: + rel = r + break + if rel: + log.debug("Adding %s for %s" % (rel.name, build)) + if not releases.has_key(rel): + releases[rel] = [] + if build not in releases[rel]: + releases[rel].append(build) + buildinfo[build]['releases'].add(rel) + valid = True + else: + log.debug("%s not a candidate tag" % tag)
# if we're using build inheritance, iterate over each release # looking to see if the latest build in its candidate tag @@ -622,7 +623,7 @@ class Root(controllers.RootController): if inheritance: log.info("Following build inheritance") for rel in Release.select(): - b = koji.listTagged(rel.dist_tag + '-updates-candidate', + b = koji.listTagged(rel.candidate_tag, inherit=True, latest=True, package=buildinfo[build]['nvr'][0])[0] if b['nvr'] == build: @@ -647,8 +648,7 @@ class Root(controllers.RootController): # Check for broken update paths log.info("Checking for broken update paths") for release in buildinfo[build]['releases']: - tags = ['dist-rawhide', release.dist_tag, - release.dist_tag + '-updates'] + tags = ['dist-rawhide', release.dist_tag, release.stable_tag] for tag in tags: pkg = buildinfo[build]['nvr'][0] for oldBuild in koji.listTagged(tag, package=pkg, @@ -1118,8 +1118,7 @@ class Root(controllers.RootController): builds = {} koji = buildsys.get_session() for release in Release.select(): - for tag in ('updates-candidate', 'updates-testing', 'updates'): - tag = '%s-%s' % (release.dist_tag, tag) + for tag in (release.candidate_tag, release.testing_tag, release.stable_tag): for build in koji.getLatestBuilds(tag, package=package): builds[tag] = build['nvr'] return builds diff --git a/bodhi/mail.py b/bodhi/mail.py index ae05c7a..cbe7ea8 100644 --- a/bodhi/mail.py +++ b/bodhi/mail.py @@ -258,7 +258,7 @@ http://fedoraproject.org/keys -------------------------------------------------------------------------------- """
-fedora-epel_errata_template = u"""\ +fedora_epel_errata_template = u"""\ -------------------------------------------------------------------------------- Fedora EPEL%(testing)s Update Notification %(updateid)s @@ -296,11 +296,12 @@ maillist_template = u"""\ """
-def get_template(update, use_template=fedora_errata_template): +def get_template(update, use_template='fedora_errata_template'): """ Build the update notice for a given update. @param use_template: the template to generate this notice with """ + use_template = globals()[use_template] line = unicode('-' * 80) + '\n' templates = []
diff --git a/bodhi/masher.py b/bodhi/masher.py index 10c7033..9b1eb0a 100644 --- a/bodhi/masher.py +++ b/bodhi/masher.py @@ -285,14 +285,11 @@ class MashTask(Thread): for update in self.updates: if not pending_nvrs.has_key(update.release.name): pending_nvrs[update.release.name] = [build['nvr'] for build in - self.koji.listTagged('%s-updates-candidate' % - update.release.dist_tag)] + self.koji.listTagged(update.release.candidate_tag)] testing_nvrs[update.release.name] = [build['nvr'] for build in - self.koji.listTagged('%s-updates-testing' % - update.release.dist_tag)] + self.koji.listTagged(update.release.testing_tag)] stable_nvrs[update.release.name] = [build['nvr'] for build in - self.koji.listTagged('%s-updates' % - update.release.dist_tag)] + self.koji.listTagged(update.release.stable_tag)]
for update in self.updates: for build in update.builds: @@ -339,21 +336,21 @@ class MashTask(Thread): mash during this push """ for update in self.updates: - release = update.release.name.lower() + release = update.release if self.resume: - self.repos.add('%s-updates' % release) - self.repos.add('%s-updates-testing' % release) + self.repos.add(release.stable_tag) + self.repos.add(release.testing_tag) elif update.request == 'stable': - self.repos.add('%s-updates' % release) + self.repos.add(release.stable_tag) if update.status == 'testing': - self.repos.add('%s-updates-testing' % release) + self.repos.add(release.testing_tag) elif update.request == 'testing': - self.repos.add('%s-updates-testing' % release) + self.repos.add(release.testing_tag) elif update.request == 'obsolete': if update.status == 'testing': - self.repos.add('%s-updates-testing' % release) + self.repos.add(release.testing_tag) elif update.status == 'stable': - self.repos.add('%s-updates' % release) + self.repos.add(release.stable_tag)
def move_builds(self): """ @@ -368,11 +365,11 @@ class MashTask(Thread): self.koji.multicall = True for update in self.updates: if update.request == 'stable': - self.tag = update.release.dist_tag + '-updates' + self.tag = update.release.stable_tag elif update.request == 'testing': - self.tag = update.release.dist_tag + '-updates-testing' + self.tag = update.release.testing_tag elif update.request == 'obsolete': - self.tag = update.release.dist_tag + '-updates-candidate' + self.tag = update.release.candidate_tag current_tag = update.get_build_tag() for build in update.builds: if build.inherited: @@ -659,7 +656,7 @@ class MashTask(Thread): prefix = update.release.long_name if not self.testing_digest.has_key(prefix): self.testing_digest[prefix] = {} - for i, subbody in enumerate(mail.get_template(update,use_template=mail.maillist_template)): + for i, subbody in enumerate(mail.get_template(update,use_template='maillist_template')): self.testing_digest[prefix][update.builds[i].nvr] = subbody[1]
def send_digest_mail(self): @@ -700,7 +697,7 @@ class MashTask(Thread): release = update.release self.updates.add(update) mashdir = config.get('mashed_dir') - repo = "%s-updates" % release.name.lower() + repo = release.stable_tag master_repomd = config.get('master_repomd') repomd = join(mashdir, repo, 'i386', 'repodata', 'repomd.xml') if not exists(repomd): diff --git a/bodhi/model.py b/bodhi/model.py index 82e3718..701699f 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -57,6 +57,26 @@ class Release(SQLObject): regex = re.compile('\D+(\d+)$') return int(regex.match(self.name).groups()[0])
+ @property + def candidate_tag(self): + if self.name.startswith('EL'): + return '%s-testing-candidate' % self.dist_tag + else: + return '%s-updates-candidate' % self.dist_tag + + @property + + @property + def testing_tag(self): + return '%s-testing' % self.dist_tag + + @property + def stable_tag(self): + if self.name.startswith('EL'): + return self.dist_tag + else: + return '%s-updates' % self.dist_tag + def __json__(self): return dict(name=self.name, long_name=self.long_name, id_prefix=self.id_prefix, dist_tag=self.dist_tag, @@ -163,8 +183,8 @@ class PackageBuild(SQLObject): # there could potentially be packages that never make their way over # -updates, so we don't want to generate ChangeLogs against those. nvr = get_nvr(self.nvr) - for tag in ['%s-updates', '%s']: - tag %= self.updates[0].release.dist_tag + release = self.updates[0].release + for tag in [release.stable_tag, release.dist_tag]: builds = koji_session.getLatestBuilds(tag, None, self.package.name) latest = None
commit d044f9409817979686d2e0710a53c3eccc6d5015 Author: Dennis Gilmore dennis@ausil.us Date: Thu Jun 18 23:37:28 2009 -0500
use template based on id_prefix tis should allow epel to work correctly
diff --git a/bodhi/mail.py b/bodhi/mail.py index 1b8eb31..ae05c7a 100644 --- a/bodhi/mail.py +++ b/bodhi/mail.py @@ -229,7 +229,7 @@ the link below:
}
-errata_template = u"""\ +fedora_errata_template = u"""\ -------------------------------------------------------------------------------- Fedora%(testing)s Update Notification %(updateid)s @@ -258,7 +258,7 @@ http://fedoraproject.org/keys -------------------------------------------------------------------------------- """
-epel_errata_template = u"""\ +fedora-epel_errata_template = u"""\ -------------------------------------------------------------------------------- Fedora EPEL%(testing)s Update Notification %(updateid)s @@ -296,7 +296,7 @@ maillist_template = u"""\ """
-def get_template(update, use_template=errata_template): +def get_template(update, use_template=fedora_errata_template): """ Build the update notice for a given update. @param use_template: the template to generate this notice with diff --git a/bodhi/model.py b/bodhi/model.py index 6b25b11..82e3718 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -459,8 +459,9 @@ class PackageUpdate(SQLObject): elif self.status == 'testing': mailinglist = config.get('%s_test_announce_list' % self.release.id_prefix.lower()) + templatetype = config.get('%s-template' % self.release.id_prefix.lower()) if mailinglist: - for subject, body in mail.get_template(self): + for subject, body in mail.get_template(self, templatetype): message = turbomail.Message(sender, mailinglist, subject) message.plain = body try:
commit 47bdc26d7cd108a9a74de8b66a9222b311fe7306 Author: Dennis Gilmore dennis@ausil.us Date: Thu Jun 18 23:37:27 2009 -0500
allow Fedora and Fedora EPEL bugs but exlcude all others
diff --git a/bodhi/model.py b/bodhi/model.py index ef7b9a1..6b25b11 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -897,7 +897,7 @@ class Bugzilla(SQLObject): log.debug("Setting Bug #%d to ON_QA" % self.bz_id) try: bug = bz.getbug(self.bz_id) - if bug.product != 'Fedora': + if bug.product != 'Fedora' and bug.product != 'Fedora EPEL': log.warning("Skipping %r bug" % bug.product) return bug.setstatus('ON_QA', comment=comment) @@ -909,15 +909,15 @@ class Bugzilla(SQLObject): def close_bug(self, update): """Close this bugzilla with details from an update.
- This method will only close Fedora bugs, and it will close them with - the status of `ERRATA`. For details on why this is so, see this - ticket: https://fedorahosted.org/bodhi/ticket/320 + This method will only close Fedora or Fedora EPEL bugs, and it will + close them with the status of `ERRATA`. For details on why this + is so, see this ticket: https://fedorahosted.org/bodhi/ticket/320 """ bz = Bugzilla.get_bz() try: ver = '-'.join(get_nvr(update.builds[0].nvr)[-2:]) bug = bz.getbug(self.bz_id) - if bug.product != 'Fedora': + if bug.product != 'Fedora' and bug.product != 'Fedora EPEL': log.warning("Not closing %r bug" % bug.product) return bug.close('ERRATA', fixedin=ver)
commit b71bc4d022459bc4fbec4a20abd6bf5ef3e7f6b6 Author: Dennis Gilmore dennis@ausil.us Date: Thu Jun 18 23:37:26 2009 -0500
add initial epel template
diff --git a/bodhi/mail.py b/bodhi/mail.py index ac4561b..1b8eb31 100644 --- a/bodhi/mail.py +++ b/bodhi/mail.py @@ -258,6 +258,35 @@ http://fedoraproject.org/keys -------------------------------------------------------------------------------- """
+epel_errata_template = u"""\ +-------------------------------------------------------------------------------- +Fedora EPEL%(testing)s Update Notification +%(updateid)s +%(date)s +-------------------------------------------------------------------------------- + +Name : %(name)s +Product : %(product)s +Version : %(version)s +Release : %(release)s +URL : %(url)s +Summary : %(summary)s +Description : +%(description)s + +-------------------------------------------------------------------------------- +%(notes)s%(changelog)s%(references)s +This update can be installed with the "yum" update programs. Use +su -c 'yum%(yum_repository)s update %(name)s' at the command line. +For more information, refer to "Managing Software with yum", +available at http://docs.fedoraproject.org/yum/. + +All packages are signed with the Fedora EPEL GPG key. More details on the +GPG keys used by the Fedora Project can be found at +https://fedoraproject.org/keys +-------------------------------------------------------------------------------- +""" + maillist_template = u"""\ ================================================================================ %(name)s-%(version)s-%(release)s (%(updateid)s)