summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-02buildpackage-rpm: listen to --no-create-orig option for native packages, toorelease-for-gbsV0.15Markus Lehtonen1-1/+1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-02rpm: indentation fix in _guess_orig_prefix()Markus Lehtonen1-2/+1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-02buildpackage-rpm: Revert tarball creation HACKsMarkus Lehtonen1-1/+1
Revert commits f04d3c96e3612855e23c87d60a2614ac6ee71a50 and 2d2c204fed2a40fba23fe8379ac49357e3904cc1. We cannot do this for native packages for which the orig source tarball changes after every change.
2013-04-02fix back trace issue if no orig tarball sourceZhang Qiang1-2/+1
Change-Id: If01f88677e43a695bec281d5638e84e6a01bcf33
2013-04-01don't re-create tar ball if already exist.Zhang Qiang1-1/+2
without this patch, tall ball always be re-created even if already exist for native package. Change-Id: Ie33569c3da77013bf2895c0f5f9b0d9752cf906f
2013-04-01fix no return value issue if no %setup, #859Yigang Wen1-1/+3
If no %setup section, return default value in guess_orig_prefix()
2013-03-26gbp.conf: Tizen specific changesMarkus Lehtonen1-5/+4
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-26buildpackage-rpm: remove extra slashes from tarball prefixMarkus Lehtonen1-1/+3
Prevents extra slashes in filenames (i.e. something like like mypkg-1.0//foo.txt) inside the orig tarball when using git archive. Also, prevents prefixes with leading slashes. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-26GitRepository: raise GitRepositoryError instead of GbpErrorMarkus Lehtonen3-8/+8
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-25buildpackage-rpm: use config file(s) from exported tree-ishMarkus Lehtonen1-15/+26
Use the local per-tree/per-branch config file(s) from the exported tree-ish instead of the current working copy. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-25GitRepository.show: use _git_inout()Markus Lehtonen1-2/+3
Instead of the deprecated _git_getoutput() method. Also, capture stderr and put the error message to the exception, instead. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-25config: 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>
2013-03-25config: option to list global config files, onlyMarkus Lehtonen3-18/+41
Fixes a bug in import-dscs introduced by "config: read the right config if run from subdir". Also, adds a new method _read_config_file() in preparation for supporting per-tree config files. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-25Add Tizen supportZhang Qiang1-1/+12
- disable building docs for tizen - Requires python, python-rpm Change-Id: I4325812839381629a3842951999d2892e9ca7c62
2013-03-21Fixed misspelled "specfilename" in pq_rpm.py: rebase_pqOlev Kartau1-1/+1
specfilename was misspelled as specfile, causing access to undefined variable
2013-03-21Fixing misspelled retval in pq_rpm.py:mainOlev Kartau1-1/+1
return value was assigned to "var" which was not declared and not used, thus we missed the real return value being non-zero.
2013-03-19gbp-pull: fix a bug introduced by fetching tagsMarkus Lehtonen1-0/+1
Only tags were fetched, but no heads at all. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-19Add .coveragercMarkus Lehtonen1-0/+2
To get correct report if coverage is invoked directly (not through nose/disttools) in order to get an xml report, for example. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-19packaging: CentOS test-requirement fixesMarkus Lehtonen1-0/+1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-19rpm-tests: fix testing of weak dependency tagsMarkus Lehtonen2-9/+8
The weak dependency tags (recommends, suggests etc) are not in rpm upstream so we can't rely on checking the version of rpmlib. Instead, just check if we run in a distro that should support those. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08GitRepository: fix '--no-signature' checking in format_patchMarkus Lehtonen1-2/+2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08GitRepository/_cmd_has_feature: more intelligent parsingMarkus Lehtonen2-1/+12
More intelligent parsing of the git output (man page). Try to parse optional options like '--[no-]standard-notes' of git-show correctly. In this example both 'no-standard-notes' and 'standard-notes' would be available. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08tests: CentOS 6 compatibilityMarkus Lehtonen11-24/+62
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08packaging: Add (conditional) %check section to specMarkus Lehtonen1-2/+11
Add unittests - disabled by default. Also, make unittest build requirements conditional. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08GitRepository: make _cmd_has_feature work in CentOS 6.3Markus Lehtonen1-1/+2
Remove backspace characters when examining man page section names. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm: support conditionals in patch-exportMarkus Lehtonen5-23/+66
One can now define conditional patches that are enclosed in '%if' or '%ifarch' when the spec file is updated. One can do this by defining 'Gbp-Rpm-If: <conditional>' and 'Gbp-Rpm-IfArch: <conditional>' in the commit message. Only one conditional per patch is supported, i.e. you cannot define 'IfArch' and 'If' for the same patch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08import-srpm: import all packaging files from src.rpmMarkus Lehtonen1-6/+15
Don't try to be too clever when importing an (true) src.rpm - just import all files from there without trying to guess file list from spec. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08import-srpm: skip pristine-tar for non-tar sources archivesMarkus Lehtonen2-3/+19
Don't even try to import non-tar archives to pristine-tar because that fails. Instead, print a warning and continue without using pristine-tar. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08GitRepository: check --no-signature option of git-format-patch before use itZhang Qiang1-2/+10
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08gbp-pull: fix guessing of remote repo in --all optionMarkus Lehtonen1-4/+10
Use 'origin' as the "fetch remote" if the current branch does not have an upstream as this is the remote that git-fetch uses in this case. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08CentOS compatibility: make GBP work with older python2.6Zhang Qiang2-9/+18
- use loops to generate dict/list - Called logging.Logger.__init__ instead of using super(). In python 2.6 logging.Logger is not new-style class, therefore supper() is failing. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08Import RpmGitRepository if DebianGitRepository is not availableZhang Qiang2-5/+11
This is just a workaround, this should be fixed in nicer way by refactoring the code Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
2013-03-08test_import_srpm: add checks for files in repoMarkus Lehtonen1-7/+25
Enhance some tests by checking that the correct files are present in the working directory of the repo. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm.SpecFile: drop the internal sources structureMarkus Lehtonen3-87/+84
Get rid of duplicate data tracking. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm.SpecFile: drop the internal 'patches' structureMarkus Lehtonen5-54/+74
To get rid of duplicate data tracking. Also, add test for testing the macro expansion of patch and source names. Also add tests for SpecFile.patchseries. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm.SpecFile: change specfile attribute to represent filenameMarkus Lehtonen5-15/+14
There is specdir to get the (absolute) directory path. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm: make SpecFile.update_patches() use new tag/macro methodsMarkus Lehtonen1-59/+43
Use new set/delete methods for updating the patches in the spec file. The internal patches structure is not updated and now only used when importing patches. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm helpers: yet another fix to patch numberingMarkus Lehtonen9-23/+25
'Patch:' does not indicate "patch number 0". Patch: and 'Patch0:' can both be present in the same spec file. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm helpers: support all tagsMarkus Lehtonen4-4/+105
Support all 'non-list' tags that we know of. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm helpers: parse 'nosource' and 'nopatch' sources correctlyMarkus Lehtonen3-2/+6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm helpers: implement _set/delete_special_macro() methodsMarkus Lehtonen4-2/+63
Currently intended for updating '%patch' macros. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm refactor: rewrite set_tag functionalityMarkus Lehtonen5-18/+194
In addition to refactoring, make sure that we keep the internal _tags structure in sync. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm/LinkedList.delete: return the previous nodeMarkus Lehtonen1-4/+7
The preceding node of the deleted node. However, return the next (i.e. the new first node) of the list if deleting the first node, and, return None if the list is empty after deletion. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm refactor: split spec parsing into multiple methodsMarkus Lehtonen2-199/+239
Also, record all tags and macros from the spec in separate internal structures. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm refactor: move spec file filtering into a separate functionMarkus Lehtonen1-29/+35
Also, remove the skip_tags option from the init as it's currently not used anywhere and it'd be better parse the spec file similarly in every place. The option can be re-added in the future if really needed. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08import-srpm: enhance spec guessingMarkus Lehtonen3-3/+19
Use package name (in case of src.rpm) or directory name (in case of dir) as the preferred name of the spec file. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm.SpecFile: return correct patch file path in patchseries()Markus Lehtonen1-1/+3
Fixes importing patches when the 'Patch:' tag contains an URI. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08rpm: fix crash when building broken specMarkus Lehtonen3-1/+27
Fixes a crash when spec contains setup macro for non-existent source. The package build would fail but gbp shouldn't crash, of course. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-08buildpackage-rpm: support setting/updating the 'VCS:' tagMarkus Lehtonen2-0/+18
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>
2013-03-08rpm helpers: support updating tags in the spec fileMarkus Lehtonen6-3/+181
Currently only the 'VCS' tag is supported. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>