def sign(self): logger.info('Starting path collection, looking for files to sign') repos = RepoCollector(self.path) paths = repos.debian_release_files if paths: logger.info('%s matching paths found' % len(paths)) # FIXME: this should spit the actual verified command logger.info('will sign with the following commands:') logger.info('gpg --batch --yes --armor --detach-sig --output Release.gpg Release') logger.info('gpg --batch --yes --clearsign --output InRelease Release') else: logger.warning('No paths found that matched') for path in paths: if merfi.config.get('check'): new_gpg_path = path.split('Release')[0]+'Release.gpg' new_in_path = path.split('Release')[0]+'InRelease' logger.info('[CHECKMODE] signing: %s' % path) logger.info('[CHECKMODE] signed: %s' % new_gpg_path) logger.info('[CHECKMODE] signed: %s' % new_in_path) else: os.chdir(os.path.dirname(path)) detached = ['gpg', '--batch', '--yes', '--armor', '--detach-sig', '--output', 'Release.gpg', 'Release'] clearsign = ['gpg', '--batch', '--yes', '--clearsign', '--output', 'InRelease', 'Release'] logger.info('signing: %s' % path) util.run(detached) util.run(clearsign)
def make_iso(self): cmd = ['genisoimage', '-r', '-o', self.output, self.source] util.run(cmd)