Changeset 2579 for trunk/packages


Ignore:
Timestamp:
Dec 5, 2009, 4:12:48 PM (15 years ago)
Author:
broder
Message:

Update the git user's .k5login in invirt-build-conf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirt-build-conf

    r2569 r2579  
    44
    55This script generates the remctl ACL and configuration for each build
    6 pocket defined in the configuration.
     6pocket defined in the configuration. It also updates the .k5login for
     7the git user that developers can push through.
    78"""
    89
     
    2728
    2829def main():
     30    all_devs = set()
     31
    2932    # Python could really use a file-like object that gets written to
    3033    # a temporary path and moved to its final resting place on
     
    4144        print >>acl_fd, '\n'.join(userToPrinc(a) for a in acl)
    4245
     46        all_devs.update(set(userToPrinc(a) for a in acl))
     47
    4348        acl_path = os.path.join('/etc/remctl/acl/build-%s' % pocket)
    4449
     
    4853    os.rename(conf_name, '/etc/remctl/conf.d/build')
    4954
     55    k5login_fd, k5login_name = tempfile.mkstemp()
     56    k5login = os.fdopen(k5login_fd, 'r+')
     57    print >>k5login, '\n'.join(all_devs)
     58
    5059
    5160if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.