From: Evan Broder Date: Sat, 5 Dec 2009 21:12:48 +0000 (-0500) Subject: Update the git user's .k5login in invirt-build-conf. X-Git-Tag: 0.1.5~60 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/commitdiff_plain/25d2b37398f10c1767e518843907b5c2adb81b57 Update the git user's .k5login in invirt-build-conf. svn path=/trunk/packages/invirt-dev/; revision=2579 --- diff --git a/invirt-build-conf b/invirt-build-conf index b5a8d3d..637d396 100755 --- a/invirt-build-conf +++ b/invirt-build-conf @@ -3,7 +3,8 @@ """Re-generate the remctl configuration for build submissions. This script generates the remctl ACL and configuration for each build -pocket defined in the configuration. +pocket defined in the configuration. It also updates the .k5login for +the git user that developers can push through. """ @@ -26,6 +27,8 @@ def userToPrinc(user): def main(): + all_devs = set() + # Python could really use a file-like object that gets written to # a temporary path and moved to its final resting place on # .close(). Oh well. @@ -40,6 +43,8 @@ def main(): acl_fd = os.fdopen(acl_fd, 'r+') print >>acl_fd, '\n'.join(userToPrinc(a) for a in acl) + all_devs.update(set(userToPrinc(a) for a in acl)) + acl_path = os.path.join('/etc/remctl/acl/build-%s' % pocket) os.rename(acl_name, acl_path) @@ -47,6 +52,10 @@ def main(): os.rename(conf_name, '/etc/remctl/conf.d/build') + k5login_fd, k5login_name = tempfile.mkstemp() + k5login = os.fdopen(k5login_fd, 'r+') + print >>k5login, '\n'.join(all_devs) + if __name__ == '__main__': main()