예제 #1
0
    def __init__(self, arch=None, featureset=None, flavour=None):
        self.log = sys.stdout.write

        self.override_arch = arch
        self.override_featureset = featureset
        self.override_flavour = flavour

        changelog = Changelog(version=VersionLinux)
        while changelog[0].distribution == 'UNRELEASED':
            changelog.pop(0)
        changelog = changelog[0]

        self.source = changelog.source
        self.version = changelog.version.linux_version
        self.version_source = changelog.version.complete

        if changelog.distribution.endswith('-security'):
            self.urls = [url_base_security]
        else:
            self.urls = [
                url_base, url_base_ports, url_base_incoming,
                url_base_ports_incoming
            ]

        self.config = ConfigCoreDump(
            fp=open("debian/config.defines.dump", "rb"))

        self.version_abi = self.config['version', ]['abiname']
예제 #2
0
    def __init__(self,
                 url,
                 url_config=None,
                 arch=None,
                 featureset=None,
                 flavour=None):
        self.log = sys.stdout.write

        self.url = self.url_config = url
        if url_config is not None:
            self.url_config = url_config
        self.override_arch = arch
        self.override_featureset = featureset
        self.override_flavour = flavour

        changelog = Changelog(version=VersionLinux)
        while changelog[0].distribution == 'UNRELEASED':
            changelog.pop(0)
        changelog = changelog[0]

        self.source = changelog.source
        self.version = changelog.version.linux_version
        self.version_source = changelog.version.complete

        self.config = ConfigCoreDump(
            fp=open("debian/config.defines.dump", "rb"))

        self.version_abi = self.config['version', ]['abiname']
예제 #3
0
    def __init__(self, options, repo):
        self.options = options

        self.changelog_entry = Changelog(version=VersionXen)[0]
        self.source = self.changelog_entry.source

        if options.version:
            self.version = options.version
        else:
            raise NotImplementedError

        if os.path.exists(os.path.join(repo, '.hg')):
            self.repo = RepoHg(repo, options)
        elif os.path.exists(os.path.join(repo, '.git')):
            self.repo = RepoGit(repo, options)
        else:
            raise NotImplementedError

        if options.component:
            self.orig_dir = options.component
            self.orig_tar = '%s_%s.orig-%s.tar.gz' % (
                self.source, self.version, options.component)
        else:
            self.orig_dir = '%s-%s' % (self.source, self.version)
            self.orig_tar = '%s_%s.orig.tar.gz' % (self.source, self.version)
예제 #4
0
    def __init__(self, config):
        super(Gencontrol, self).__init__(ConfigCoreDump(fp=open(config, "rb")),
                                         Templates(["debian/templates"]))

        config_entry = self.config['version', ]
        self.version = VersionLinux(config_entry['source'])
        self.abiname = config_entry['abiname']
        self.vars = {
            'upstreamversion':
            self.version.linux_upstream,
            'version':
            self.version.linux_version,
            'source_package':
            self.changelog[0].source,
            'source_suffix':
            re.sub(r'^linux-latest', r'', self.changelog[0].source),
            'source_upstream':
            self.version.upstream,
            'abiname':
            self.abiname,
        }

        changelog_version = Changelog()[0].version
        self.package_version = '%s+%s' % (self.version.linux_version,
                                          changelog_version.complete)
    def write_changelog(self):
        changelog_text = self.substitute(self.templates['changelog.in'],
                                         self.vars)
        changelog = Changelog(file=io.StringIO(changelog_text))

        # We need to insert a new version entry.
        # Take the distribution and urgency from the linux changelog, and
        # the base version from the changelog template.
        vars = self.vars.copy()
        vars['distribution'] = self.changelog[0].distribution
        vars['urgency'] = self.changelog[0].urgency
        vars['maintainer'] = self.changelog[0].maintainer
        vars['date'] = self.changelog[0].date
        vars['signedsourceversion'] = (
            changelog[0].version.complete + '+' +
            re.sub(r'-', r'+', vars['imagebinaryversion']))

        with codecs.open(self.template_debian_dir + '/changelog', 'w',
                         'utf-8') as f:
            f.write(
                self.substitute(
                    '''\
linux-signed-@arch@ (@signedsourceversion@) @distribution@; urgency=@urgency@

  * Update to linux @imagebinaryversion@

 -- @maintainer@  @date@

''', vars))
            f.write(changelog_text)
예제 #6
0
    def __init__(self, input_tar, input_patch=None):
        self.log = sys.stdout.write

        self.input_tar = input_tar
        self.input_patch = input_patch

        changelog = Changelog()[0]
        source = changelog.source
        version = changelog.version.upstream
        self.orig = '%s-%s' % (source, version)
        self.orig_tar = '%s_%s.orig.tar.gz' % (source, version)
예제 #7
0
    def __init__(self, url, url_config=None, arch=None, featureset=None,
                 flavour=None):
        self.log = sys.stdout.write

        self.url = self.url_config = url
        if url_config is not None:
            self.url_config = url_config
        self.override_arch = arch
        self.override_featureset = featureset
        self.override_flavour = flavour

        changelog = Changelog(version=VersionLinux)
        while changelog[0].distribution == 'UNRELEASED':
            changelog.pop(0)
        changelog = changelog[0]

        self.source = changelog.source
        self.version = changelog.version.linux_version
        self.version_source = changelog.version.complete

        self.config = ConfigCoreDump(fp=open("debian/config.defines.dump",
                                             "rb"))

        self.version_abi = self.config['version', ]['abiname']
예제 #8
0
    def __init__(self, repo, commit):
        self.log = sys.stdout.write

        changelog = Changelog()[0]
        source = changelog.source
        version = changelog.version

        self.config = Config()

        self.log('Using source name %s, version %s\n' %
                 (source, version.upstream))

        self.orig = '%s-%s' % (source, version.upstream)
        self.orig_tar = '%s_%s.orig.tar.xz' % (source, version.upstream)
        self.repo = repo
        self.commit = commit
예제 #9
0
    def __init__(self, repo, override_version):
        self.log = sys.stdout.write

        changelog = Changelog()[0]
        source = changelog.source

        version = override_version or changelog.version.upstream

        self.config = Config()

        self.log('Using source name %s, version %s\n' % (source, version))

        self.orig = '%s-%s' % (source, version)
        self.orig_tar = '%s_%s.orig.tar.xz' % (source, version)
        self.repo = repo
        self.tag = version
예제 #10
0
    def __init__(self, config):
        super(Gencontrol, self).__init__(ConfigCoreDump(fp=file(config)),
                                         Templates(["debian/templates"]))

        config_entry = self.config['version', ]
        self.version = VersionLinux(config_entry['source'])
        self.abiname = config_entry['abiname']
        self.vars = {
            'upstreamversion': self.version.linux_upstream,
            'version': self.version.linux_version,
            'source_upstream': self.version.upstream,
            'abiname': self.abiname,
        }

        changelog_version = Changelog()[0].version
        self.package_version = u'%s+%s' % (self.version.linux_version,
                                           changelog_version.complete)
예제 #11
0
    def __init__(self, input_files, override_version):
        self.log = sys.stdout.write

        self.input_files = input_files

        changelog = Changelog(version=VersionLinux)[0]
        source = changelog.source
        version = changelog.version

        if override_version:
            version = VersionLinux('%s-0' % override_version)

        self.version_dfsg = version.linux_dfsg
        if self.version_dfsg is None:
            self.version_dfsg = '0'

        self.log('Using source name %s, version %s, dfsg %s\n' % (source, version.upstream, self.version_dfsg))

        self.orig = '%s-%s' % (source, version.upstream)
        self.orig_tar = '%s_%s.orig.tar.xz' % (source, version.upstream)
        self.tag = 'v' + version.linux_upstream_full
예제 #12
0
    def __init__(self, input_tar, input_patch, override_version):
        self.log = sys.stdout.write

        self.input_tar = input_tar
        self.input_patch = input_patch

        changelog = Changelog(version=VersionLinux)[0]
        source = changelog.source
        version = changelog.version

        if override_version:
            version = VersionLinux('%s-undef' % override_version)

        self.version_dfsg = version.linux_dfsg
        if self.version_dfsg is None:
            self.version_dfsg = '0'

        self.log('Using source name %s, version %s, dfsg %s\n' %
                 (source, version.upstream, self.version_dfsg))

        self.orig = '%s-%s' % (source, version.upstream)
        self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream)
예제 #13
0
    def __init__(self, input_files, override_version):
        self.log = sys.stdout.write

        self.input_files = input_files

        changelog = Changelog(version=VersionLinux)[0]
        source = changelog.source
        version = changelog.version

        if override_version:
            version = VersionLinux('%s-undef' % override_version)

        self.version_dfsg = version.linux_dfsg
        if self.version_dfsg is None:
            self.version_dfsg = '0'

        self.log('Using source name %s, version %s, dfsg %s\n' %
                 (source, version.upstream, self.version_dfsg))

        self.orig = '%s-%s' % (source, version.upstream)
        self.orig_tar = '%s_%s.orig.tar.xz' % (source, version.upstream)
        self.tag = 'v' + re.sub(r"^(\d+\.\d+)\.0", r"\1",
                                version.upstream.replace('~', '-'))
예제 #14
0
 def process_changelog(self):
     changelog = Changelog(version=VersionXen)
     self.version = changelog[0].version
     self.vars = {
         'version': self.version.xen_version,
     }