'submodules': 'False',
'symlink-orig': 'True',
'tarball-dir': '',
+ 'upstream-signatures': 'auto',
'template-dir': '',
'time-machine': 1,
'track': 'True',
"default is '%(postimport)s'",
'hooks':
"Enable running all hooks, default is %(hooks)s",
+ 'upstream-signatures':
+ "Whether to import/export upstream tarball signatures",
'time-machine':
"don't try to apply patch queue to head commit only. "
"Try at most TIME_MACHINE commits back, "
"pristine tar commit from" % (source.component,
upstream_tree))
gbp.log.debug("Creating pristine tar commit '%s' from '%s'" % (source.path, subtree))
- self.pristine_tar.commit(source.path, subtree, quiet=True)
- self.pristine_tar.commit(sources[0].path, main_tree, quiet=True)
+ self.pristine_tar.commit(source.path, subtree, signaturefile=source.signaturefile, quiet=True)
+ self.pristine_tar.commit(sources[0].path, main_tree, signaturefile=sources[0].signaturefile, quiet=True)
except CommandExecFailed as e:
raise GitRepositoryError(str(e))
import gbp.command_wrappers as gbpc
from gbp.deb import (DebianPkgPolicy, parse_changelog_repo)
from gbp.deb.format import DebianSourceFormat
-from gbp.deb.upstreamsource import (DebianUpstreamSource,
- DebianAdditionalTarball)
+from gbp.deb.upstreamsource import DebianUpstreamSource
from gbp.deb.uscan import (Uscan, UscanError)
from gbp.deb.changelog import ChangeLog, NoChangeLogError
from gbp.deb.git import GitRepositoryError
dest="symlink_orig")
import_group.add_config_file_option("component", action="append", metavar='COMPONENT',
dest="components")
+ import_group.add_config_file_option(option_name="upstream-signatures",
+ dest="upstream_signatures",
+ type='tristate')
cmd_group.add_config_file_option(option_name="postimport", dest="postimport")
cmd_group.add_config_file_option(option_name="postunpack", dest="postunpack")
if options.pristine_tar:
if pristine_orig:
repo.rrr_branch('pristine-tar')
+ for source in sources:
+ # Enforce signature file exists with --upstream-signatures=on
+ if options.upstream_signatures.is_on() and not source.signaturefile:
+ raise GbpError("%s does not have a signature file" % source.path)
# For all practical purposes we're interested in pristine_orig's path
if pristine_orig != sources[0].path:
sources[0]._path = pristine_orig