Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Get rid of duplicate data tracking.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Yigang Wen <yigangx.wen@intel.com>
|
|
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>
|
|
There is specdir to get the (absolute) directory path.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
'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>
|
|
Support all 'non-list' tags that we know of.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Currently intended for updating '%patch' macros.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
In addition to refactoring, make sure that we keep the internal _tags
structure in sync.
Changes the default place for new tags: add new tags after the 'Name:'
tag instead of 'Release:'.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Also, record all tags and macros from the spec in separate internal
structures.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
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>
|
|
Fixes importing patches when the 'Patch:' tag contains an URI.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Currently only the 'VCS' tag is supported.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Basic tests for virtually all features of import-srpm.
Adds a new python module to include all (upcoming) git-buildpackage rpm
commandline tool tests. Also, adds a separate git submodule for the rpm
test data.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Get rid of the unnecessary private methods.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This can be used to mark location where to add new patch macros when
updating the spec.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
to 'Gbp-Ignore-Patches' for better readability. All the special keys (or
"gbp-tags") now have to start with the "Gbp-" prefix.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Tries to make spec parsing and updating more robust by using a linked
list to represent spec content, instead of using normal list and trying
to track line numbers. Deleting and adding lines should be safer, now.
Also, consolidates the regexp usage of spec parsing a bit.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This class is intended to store the spec file content, needed for
modifying the spec file.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Parse the spec file two times to circumvent a rpm-python problem which
causes macros not to be correctly expanded if used before their
definition.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Adds the new 'color-scheme' option to the rpm tools.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This new file contains distro-specific list of
packages that are needed for testing. These are
written in separate file to avoid polluting specfiles,
and are used by automatic testing script.
Signed-off-by: Olev Kartau <olev.kartau@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Make patch export fail if local patch files (not marked for manual
maintenance) exist.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
A new return value for failed patch import. If the patch import fails
the repo is left in clean and buildable state so one might want to
distinguish that from other failures.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Sync with the latest version of the git-buildpackage RPM tools. Also add
more content to the "building" and "development" sections.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Which caused the packager tag to be incorrect in some cases. Rpm-python
doesn't seem to reset spec.sourceHeader[rpm.RPMTAG_PACKAGER] if no
packager tag is defined in the spec file. Thus, if we (in the same
context) first parse spec A (which has a packager tag) and then spec B
(which doesn't have a packager tag) python-rpm will give the packager of
A for B as well.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Support special 'WC*' and 'INDEX' values for the --git-upstream-tree
option.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Import source rpms in the same way as unpacked sources: that is, first
unpack the srpm and then use the same code for importing. Also, tries to
make tmpdir handling a bit better: all temporary directories are created
under one "base tmpdir".
Also, get rid of the orig tarball guessing and unpackging in SrcRpmFile
class in gbp.rpm.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
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>
|
|
Now a prefix is guessed for all source archives (not for the one and
only "orig archive"). By default it is
'<archive_name>-<archive_version>/' if name and version can be
determined from the filename. If not, the archive basename (i.e.
filename less archive and compression extensions) is used.
In addition, more logic is applied to the "orig archive": gbp examines
the setup macro (if found) for the source and takes the prefix from
there. If some macros (in the '-n' option of the setup macro) cannot be
expanded archive basename us used as the prefix.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Adds support for importing compressed patches.
NOTE: Only gzip is supported, for the time being, other compression
methods shouldn't be to hard to add, if needed.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Adds support to use a special rpmlib, defined by rpm packaging policy.
This makes it possible to use the target distro's rpmlib. That is, parse
spec files for target distros (and architectures) incompatible with your
host system.
With the default RpmPkgPolicy, GBP tries to import "rpmlibgbp".
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|