summaryrefslogtreecommitdiff
path: root/gbp/config.py
AgeCommit message (Collapse)AuthorFilesLines
2016-03-09Use vendor to publish in srpm unpackJun Wang1-21/+23
Change-Id: I02f5d8cc11a268c7dd075da6e0064d3fedf72721
2014-12-19Introduce submit-bb toolMarkus Lehtonen1-0/+7
This is a Tizen-specific tool for creating and pushing special submit tags. Change-Id: Id014ce2aeced75f6506cd8559adcd787f958e6b4 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-19Introduce buildpackage-bb toolMarkus Lehtonen1-0/+9
Initial version of the tool for building BitBake packages from Git. NOTE: The buildpackage-bb tool itself is able to operate even without an initialized BitBake build environment although the build likely fails in this case. However, this makes it possible to export the packaging meta data, for example. Change-Id: I86204e477308da51f71fab76150ede4bd90e4d6e Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-19Introduce import-bb toolMarkus Lehtonen1-0/+14
This is the first tool in an effort of enabling gbp in the BitBake build environment. Gbp-import-bb is a tool for importing packages from a BitBake-based "combined" distro repository into individual per-package Git repositories. Change-Id: I86e27d8a1817eae30c3f828cea70b06162543000 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14buildpackage-rpm: add '--git-native' optionMarkus Lehtonen1-0/+3
Can be used to explicitly configure a package as native or non-native. Default behavior is still to guess based on the existence of upstream branch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm-ch: implement --meta-bts optionMarkus Lehtonen1-0/+3
This gives the user the possibility to define what meta tags (in git commit message) git-rpm-ch recognizes as bug tracking system references. Or, makes it possible to disable bts meta tag tracking altogether. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Introduce git-rpm-ch toolMarkus Lehtonen1-0/+15
Initial version of the git-rpm-ch tool which is intended for maintaining RPM changelogs. Supports both spec files and separate "OBS style" changelog files. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14pq-rpm: implement '--import-files' command line optionMarkus Lehtonen1-0/+6
For defining the packaging file(s) that will be imported into the development/patch-queue branch. By default, the local gbp conf files are imported in order to try to ensure that gbp sees the same settings on the development/pq branch as on the packaging branch. NOTE: This option does not affect the patch files that are imported. The files defined with this option will appear as new files in one monolithic commit in the development/patch-queue branch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14import-srpm: support for patch importMarkus Lehtonen1-0/+4
Adds a new commandline option '--patch-import' for importing patches into the source tree in packaging branch. When enabled, gbp applies and commits all patches (not marked for manual maintenance) into the packaging branch. If this succeeds, it also removes all imported patch files from the packaging directory and the spec file. Currently only supported for non-orphan-packaging. This setting is true by default which should make more sense as the developer wants to do code development in the packaging branch (if he/she selects to use non-orphan packaging). However, patch-import is force-disabled if in bare git repository. We cannot support this, currently. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14buildpackage-rpm: support setting/updating the 'VCS:' tagMarkus Lehtonen1-0/+4
Git-buildpackage-rpm now always updates the 'VCS:' tag in the exported spec file. A new config option 'spec-vcs-tag' controls the format: - if empty, no 'VCS' tag is inserted and possible old 'VCS' tag is removed - otherwise, a 'VCS' tag is inserted or the old 'VCS' tag is updated - '%(tag)s' expands to the long tag name (from git-describe) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm: implement file path filters in patch exportMarkus Lehtonen1-0/+4
Implements a filter option allows one to filter out changes to certain files/paths in the patch-generation. A commit is totally ignored if all files would be filtered out. The path filter is given as a Python regexp. This option is useful for example in filtering out the changes to packaging files when maintaining packaging and sources in the same branch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm: support squashing commits in patch generationMarkus Lehtonen1-0/+5
Implements an option for git-buildpackage-rpm and gbp-pq to squash commits (from upstream) up to certain tree-ish into one monolithic diff. Useful e.g. if you wan't to auto-generate a stable update patch. The new format of the cmdline option filename is commit-ish followed by (optionally) a colon and the desired diff filename base. Suffix '.diff' is added by GBP. Magic word 'HEAD' translates to the end-commit when given as the squash-point. This allows one to configure gbp to always squash all commits into one monolithic diff. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm: add --orig-prefix optionMarkus Lehtonen1-0/+4
Adds a new option --orig-prefix that affects the prefix of the generated/imported orig tarballs. For git-buildpackage-rpm, it defines the prefix of tarballs generated by the tool, 'auto' (default) makes gbp to guess the prefix, as before. NOTE: this doesn't affect the tarballs checked out from pristine-tar (i.e. if --pristine-tar is defined) or tarballs that are already present (see --git-tarball-dir option). For git-import-orig, this new option affects the prefix of tarballs imported into pristine-tar branch. If set to 'auto' (default) gbp doesn't mangle the prefix. Other tools (e.g. git-import-srpm) are not affected. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm: support generating compressed patchesMarkus Lehtonen1-0/+5
This patch adds the support to generate compressed patches. User can define the patch file size limit after which patches gzipped. Re-writes the write_patch() function(s) and now uses the same-and-only write_patch() for buildpackage-rpm and pq-rpm. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14rpm helpers: make SpecFile and SrcRpmFile give (full) version as dict.Markus Lehtonen1-0/+1
The Dictionary contains different "version components", such as upstreamversion, release and epoch. Makes e.g. tag creation consistent, now. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14buildpackage-rpm: add option --git-ignore-untrackedMarkus Lehtonen1-0/+4
Adds a new commandline option to ignore untracked files, when running git-buildpackage-rpm. When this option is given, the git-buildpackage-rpm command fails if there are changes to tracked files, but, succeeds if there are untracked files present. Normally it fails in either case. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Introduce git-import-orig-rpm toolMarkus Lehtonen1-0/+5
Initial version of the git-import-orig-rpm: version of git-import-orig intended for maintaining rpm packages. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Introduce git-buildpackage-rpm toolMarkus Lehtonen1-1/+14
Initial version of git-buildpackage-rpm: git-buildpackage tool for rpms. Also adds some new options to config.py that are exclusively used in this tool. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
2014-11-14pq-rpm: add new --pq-branch optionMarkus Lehtonen1-0/+4
Adds a new command line option '--pq-branch' to set the name of patch-queue branches. Changes the defaults pq-branch name for rpm tools to 'development/%(branch)s' (instead of the old 'patch-queue/%(branch)s'). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Introduce gbp-pq-rpm toolMarkus Lehtonen1-0/+5
Initial version of gbp-pq-rpm: a tool for managing patch queues for rpm packages. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com>
2014-11-14Add 'packaging-branch' cmdline optionMarkus Lehtonen1-0/+5
This is the counterpart of 'debian-branch' (basically identical to that) to not confuse rpm maintainers. Also, adds this option to gbp-clone and gbp-pull commands (as an alternative to the 'debian-branch option), which are usable for RPM in their current form. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14Universal configurable base tmpdir for all gbp toolsMarkus Lehtonen1-0/+4
Adds support for a configurable tmpdir under which all gbp tools now create their temporary directories and files. NOTE: an exception is git-import-dscs which doesn't use the common configuration system. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14buildpackage: implement --[no-]build cmdline optionMarkus Lehtonen1-0/+3
For enabling/disabling the builder script. The option is a bit asymmetric: --git-no-build automatically disables the 'postbuild' hook whereas --git-build does not enable it (e.g. if --git-no-hooks is given). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14config: support for per-tree config filesMarkus Lehtonen1-5/+21
Add support for reading the local config file(s) from a given git tree-ish. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14config: read the right config if run from subdirMarkus Lehtonen1-13/+41
A step towards being able to run GBP tools from subdirectories. Now expands '%(top_dir)s' and '%(git_dir)s' in config file path to root of the working directory and git metadata directory, respectively. Also, adds a new method _read_config_file() in preparation for supporting per-tree config files. Fixes tests.test_Config: currently the only correct way to define the config file(s) to be parsed is by using the GBP_CONF_FILES environment variable. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14import-orig: implement --create-missing-branches optionMarkus Lehtonen1-1/+2
Create the upstream branch if it does not exist. Use the same option name that import-dsc has. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14GbpOptionParser: allow using the default 'dest' attributeMarkus Lehtonen1-5/+3
Make it possible to add options without explicitly defining the 'dest' attribute - in which case the default of OptionParser is used. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-11-14gbp-dch: fix handling of the '--meta' optionMarkus Lehtonen1-1/+1
Make it effective again - previously it was totally ignored. Also, change it's default value to True to match the current behavior. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-10-12pq: Add "pq export --commit" optionGuido Günther1-0/+3
This commits the changes in the pq right away. This is currently experimental and subject to change.
2014-09-26meta-closes: Move help text to GbpOptionParser.helpGuido Günther1-0/+2
2014-09-12Allow to always drop pq branch after exportGuido Günther1-0/+4
Closes: #761160
2014-08-19buildpackage: Make debian-tag message configurableKamal Mostafa1-0/+4
New config option --git-debian-tag-msg allows for the specification of the message format string for signed debian-tags. When left unset, the default debian-tag-msg format is still: %(pkg)s Debian release %(version)s Signed-off-by: Kamal Mostafa <kamal@whence.com>
2014-07-24import-srpm: add 'vendor' config optionMarkus Lehtonen1-0/+3
Intended to represent the distribution vendor (e.g. 'Debian'). Currently, this can be used in tag format strings. NOTE: the vendor name is converted to lowercase when used in tag names. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-07-24Introduce git-import-srpm toolMarkus Lehtonen1-0/+30
Initial version of the git-import-srpm: a tool for importing source rpms. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2014-05-16Fix comitter vs committer typosGuido Günther1-2/+2
Thanks: Sandro Tosi Closes: #748339
2014-04-03config: add decorator to add_option_* functionsGuido Günther1-12/+36
This allows us to build an internal list of valid options and print these.
2014-04-01Add minimal 'config' commandGuido Günther1-2/+13
This only allows to print single config values so far. Closes: #733470
2014-04-01Test option parser fallbacks more thoroughlyGuido Günther1-1/+0
revealing another bug where we overwrote parsed values with defaults Closes: #733759
2014-03-29Use a much simpler version to fix the command name in --helpGuido Günther1-7/+7
mostly reverting e1780f0. Closes: #742907
2014-03-27Fix command outputGuido Günther1-1/+7
The first line lacked the subcommand like: $ gbp pull --help Usage: gbp [options] - safely update a repository from remote instead of $ gbp pull --help Usage: gbp pull [options] - safely update a repository from remote ^^^^
2014-02-19config: Don't pull in config defaults twiceGuido Günther1-4/+5
This would otherwise overwrite values set in the legacy config sections. Closes: #733759
2014-02-18config: Don't pull in config defaults twiceGuido Günther1-1/+3
This would otherwise overwrite values set in the legacy config sections. Closes: #733759
2014-01-05Change the default of cleaner to /bin/trueGuido Günther1-1/+1
Running a clean command within version control by default nowadays causes more trouble than it helps. It's unnecessary with pbuilder/cowbuilder/sbuild and with export-dir. So change the default from 'debuild clean' to a noop ('/bin/true'). Closes: #670624
2014-01-05Make parsing config file sections symmetricGuido Günther1-6/+12
Always read the legacy command's config file section prior to the subcommand's config file section. Until now 'gbp <subcommand>' would read '[subcommand]' as well as '[gbp-<subcommand>]' sections while 'gbp-<subcommand>' would only read '[gbp-<subcommand>]' sections. Closes: #733759
2013-09-04config: restore mangled env in doctestsMarkus Lehtonen1-1/+4
Otherwise the mangled GBP_CONF_FILES affects also other doctests when run with python-nose. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-06-26config: Don't fill in the parser with all defaultsGuido Günther1-2/+7
There's no need to fill the parser with all the built in defaults since we can simply copy them to the config from the class dict. This allows us to first set the values from the old {git,gbp}-* commands and then only overwrite changed values from the newer "gbp <command>" versions. Otherwise we'd overwite all old style config with the new style one. This also fixes the problem where the default section wouldn't be read at all if the command doesn't even have an empty section in any gbp.conf file.
2013-06-26Consistently call gbp the supercommandGuido Günther1-2/+2
and robustify against invalid modules names.
2013-06-19GbpOptionParser: Make sure we parse the old config sectionsGuido Günther1-0/+9
For backward compatibility between {gbp,git}-<subcommand> and "gbp <subcommand>" make sure we parse the former sections if using the later.
2013-06-19GbpOptionParser: Make sure we access the GbpOptionParser*'s default dictGuido Günther1-1/+1
and not the one from the OptionParser. The instance's default dict this gets reset to empty when invoking OptionParser.__init__.
2013-04-26buildpackage: implement --[no-]hooks optionMarkus Lehtonen1-0/+3
For enabling/disabling all hooks. This option does not affect the builder command, though. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>