diff --git a/roles/badges-backend/files/patched-fedmsg-hub b/roles/badges-backend/files/patched-fedmsg-hub new file mode 100644 index 0000000000..aaa8594bfb --- /dev/null +++ b/roles/badges-backend/files/patched-fedmsg-hub @@ -0,0 +1,16 @@ +#!/usr/bin/python +# This file is managed by ansible. +# +# Its like "permanent hotfix" so that the fedmsg-hub loads +# the forward-compat sqlalchemy. +# + +__requires__ = ['fedmsg', "sqlalchemy>=0.7"] +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.exit( + load_entry_point('fedmsg', 'console_scripts', 'fedmsg-hub')() + ) + diff --git a/roles/badges-backend/tasks/main.yml b/roles/badges-backend/tasks/main.yml index 77b5a6eb17..c079a5e99c 100644 --- a/roles/badges-backend/tasks/main.yml +++ b/roles/badges-backend/tasks/main.yml @@ -30,6 +30,18 @@ - config - badges +# Here I'm "permanently" hotfixing the fedmsg-hub +# It needs to load the forward-compat sqlalchemy0.7 package from the get-go. +- name: copy over patched fedmsg-hub + template: > + src=patched-fedmsg-hub dest=/usr/bin/fedmsg-hub + owner=root group=root mode=0755 + tags: + - patches + - hotfix + notify: + - restart fedmsg-hub + - name: copy over all our badge definitions copy: > src=$item