Commit graph

934 commits

Author SHA1 Message Date
Neal Gompa
9494cc13b7 Tagger: Add SUSETagger to support SUSE-style detached changelogs
SUSE-style RPM packaging generally prefers having the RPM changelog
detached from the main RPM spec file as a changes file. This file is
typically named <pkg>.changes (corresponding to <pkg>.spec).

At package build time in the Open Build Service, the content of the
changes file is reformatted to the RPM changelog structure and
appended to the spec file by the build system before rpmbuild
processes it.

This change adds support for this particular workflow, which is
common in communities using an instance of the Open Build Service,
such as (open)SUSE.

This was originally authored by Michael Calmer. The code was ported
to work on Python 3 and adapted for the current tito codebase
by Neal Gompa.

Co-authored-by: Michael Calmer <mc@suse.de>
Co-authored-by: Neal Gompa <ngompa13@gmail.com>
2018-09-16 18:34:35 -04:00
Devan Goodwin
0942baa121
Merge pull request #324 from falcon006/add_gitlfs_support
Add support for building with Git LFS.
2018-07-24 08:58:04 -03:00
Nicholas Tillman
25fc538888 Add support for building with Git LFS. 2018-07-20 14:45:38 -07:00
Devan Goodwin
05f43d20bc
Merge pull request #318 from mtinberg/master
use built-in shutil.copy2 instead of relying external cp file globbing
2018-04-23 08:13:18 -03:00
Devan Goodwin
bc3bf14f54
Merge pull request #317 from treydock/fix-mock-double-build
Avoid double builds with mock
2018-03-05 08:43:18 -04:00
Mark Tinberg
00a084f7d2 use built-in shutil.copy2 instead of relying external cp file globbing 2018-03-02 15:03:58 -06:00
Trey Dockendorf
dcd355949e Avoid double builds with mock
According to mock man page the default behavior without a command flag is to run --rebuild.
This change avoids what is essentially doing --rebuild twice.
2018-03-02 12:59:06 -05:00
Devan Goodwin
18babd175f
Merge pull request #309 from dgoodwin/fix-test-suite
Fix rsync failures in dockerized tests, update for F27.
2017-12-07 12:01:11 -04:00
Devan Goodwin
03196239a7 Fix rsync failures in dockerized tests, update for F27. 2017-12-07 11:12:11 -04:00
Devan Goodwin
cc7e168011 Automatic commit of package [tito] release [0.6.11-1].
Created by command:

/usr/bin/tito tag
2017-12-07 09:57:27 -04:00
Devan Goodwin
73448515e2
Merge pull request #307 from adammhaile/master
Fixing remote_git_name
2017-12-04 14:44:52 -04:00
Adam Haile
8c92f424fc Fixing remote_git_name 2017-12-04 13:43:43 -05:00
Devan Goodwin
e3f00bc89d
Merge pull request #302 from vfreex/mock-output
Print mock output when building with MockBuilder
2017-11-14 08:12:06 -04:00
Devan Goodwin
eaa62c7172
Merge pull request #303 from mirzal/encourage-follow-tags
Encourage usage of git push --follow-tags
2017-11-01 08:46:34 -03:00
Devan Goodwin
c45ccd60cd
Merge pull request #304 from mirzal/readme-fixes
Fix links in README.md file
2017-11-01 08:45:52 -03:00
Mirosław Zalewski
65584880bb Fix links in README.md file 2017-11-01 12:11:07 +01:00
Mirosław Zalewski
1bb3471bcb Encourage usage of git push --follow-tags
--follow-tags pushes both new commits and their tags in one transaction.
It is functional equivalent of git push && git push --tags, but with
less typing. It is available since git 1.8.3 released in April 2013.
2017-11-01 11:53:30 +01:00
Yuxiang Zhu
a1ecfd3905 Print mock output when building with MockBuilder
Currently when building RPMs or SRPMs with MockBuilder, tito will not print the
output from mock. This makes diagnosis harder especially in CI
environments.

This PR will do the following changes:

1. If `--quiet` option is not specified, `run_command_print` will be used to
run the `mock` or `rpmbuild` command. Otherwise we will continue to use
`run_command`.
2. `run_command_print` will print error message when an error happens, like what `run_command`
does.
2017-11-01 14:51:09 +08:00
Devan Goodwin
9f901b1667 Merge pull request #298 from vfreex/fix-build-dir-creation
Fix a race condition when /tmp/tito doesn't exist
2017-09-08 10:25:49 -03:00
Yuxiang Zhu
d4b41ad16e Fix a race condition when /tmp/tito doesn't exist
When doing concurrent build, if `/tmp/tito` doesn't exist, even if different output
directories for different builds are specified,
tito will fail because tito processes are trying to create
`/tmp/tito` at the time that directory doesn't exist.

Here is the stack trace when this issue occurs:

06:42:15 [el7] + tito build --test --rpm --output=artifacts/el7 --builder=tito.builder.MockBuilder --arg=mock=eng-rhel-7-candidate-x86_64
06:42:16 [el7] ERROR: Error running command: mkdir /tmp/tito
06:42:16 [el7]
06:42:16 [el7] Status code: 256
06:42:16 [el7]
06:42:16 [el7] Command output: mkdir: cannot create directory '/tmp/tito': File exists
06:42:16 [el7]
06:42:16 [el7] Creating output directory: /tmp/tito
06:42:16 [el7] Traceback (most recent call last):
06:42:16 [el7]   File "/usr/bin/tito", line 23, in <module>
06:42:16 [el7]     CLI().main(sys.argv[1:])
06:42:16 [el7]   File "/usr/lib/python2.7/site-packages/tito/cli.py", line 201, in main
06:42:16 [el7]     module = module_class()
06:42:16 [el7]   File "/usr/lib/python2.7/site-packages/tito/cli.py", line 298, in __init__
06:42:16 [el7]     BaseCliModule.__init__(self, "usage: %prog build [options]")
06:42:16 [el7]   File "/usr/lib/python2.7/site-packages/tito/cli.py", line 223, in __init__
06:42:16 [el7]     self._add_common_options()
06:42:16 [el7]   File "/usr/lib/python2.7/site-packages/tito/cli.py", line 242, in _add_common_options
06:42:16 [el7]     run_command("mkdir %s" % default_output_dir)
06:42:16 [el7]   File "/usr/lib/python2.7/site-packages/tito/common.py", line 426, in run_command
06:42:16 [el7]     raise RunCommandException(command, status, output)
06:42:16 [el7] tito.exception.RunCommandException: Error running
command: mkdir /tmp/tito

This change will make sure that the user defined output directory will
be created if the default output directory, `/tmp/tito`, is overridden by the '--output' option.
2017-09-06 20:46:05 +08:00
Devan Goodwin
3e3a6f8aca Merge pull request #287 from pfournier/no-dist-release-line
Don't append 'None' to Release line with no '%{?dist}' part
2017-08-29 12:28:59 -03:00
Patrice Fournier
2a89594819 Don't append 'None' to Release line with no '%{?dist}' part 2017-08-29 09:28:09 -04:00
Steve Kuznetsov
7482a07842 Merge pull request #300 from evgeni/py3-map-is-not-list
python3's map() returns a map object, but we expect sources to be a list
2017-08-08 06:05:20 -07:00
Evgeni Golov
caa7c77440 python3's map() returns a map object, but we expect sources to be a list 2017-08-08 10:00:56 +02:00
Devan Goodwin
e153a58611 Merge pull request #292 from dgoodwin/fixtypo
Submitting was missing a t.
2017-06-12 08:59:07 -03:00
jesus m. rodriguez
554e406386 Submitting was missing a t. 2017-06-11 21:29:46 -04:00
Devan Goodwin
895890a7a2 Merge pull request #285 from evgeni/release-tagger-use-version-support
ReleaseTagger --use-version support
2017-05-26 08:09:37 -03:00
Devan Goodwin
d0184efaf1 Merge pull request #289 from RobberPhex/patch-1
update links
2017-05-26 08:04:59 -03:00
Robert LU
773ede2ce1 update links 2017-05-26 16:59:24 +08:00
Devan Goodwin
19d38ad203 Merge pull request #288 from dgoodwin/revert-286-lc
Revert "use LC_ALL=C.UTF-8 rather than plain C"
2017-05-25 09:09:37 -03:00
Devan Goodwin
58b0e0a385 Revert "use LC_ALL=C.UTF-8 rather than plain C" 2017-05-25 08:09:24 -03:00
Devan Goodwin
8e750823f9 Merge pull request #286 from xsuchy/lc
use LC_ALL=C.UTF-8 rather than plain C
2017-05-24 09:22:57 -03:00
Miroslav Suchý
89ebaa23ce use LC_ALL=C.UTF-8 rather than plain C
addressing:
Python runtime initialized with LC_CTYPE=C (a locale with default ASCII encoding), which may cause Unicode compatibility problems. Using C.UTF-8, C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is recommended.
2017-05-24 13:37:22 +02:00
Steve Kuznetsov
6566ec5646 Merge pull request #284 from stevekuznetsov/skuznets/formatting
Format package list more cleanly
2017-05-23 12:43:50 -04:00
Evgeni Golov
c8d08743b4 make ReleaseTagger honour --use-version
Fixes: #274
2017-05-22 09:05:56 +02:00
Evgeni Golov
e4746a6838 also verify that ReleaseTagger supports --use-release 2017-05-22 09:05:33 +02:00
Evgeni Golov
dfbf502749 add test for ReleaseTagger together with --use-version 2017-05-22 08:53:24 +02:00
Steve Kuznetsov
7f6d1a5e14
Format package list more cleanly
When building a large number of packages, the current output from tito
will place all of them on one very long line, which makes it hard to
read. Instead, we should place them on separate lines to format them
more like a list.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-05-19 16:34:15 -07:00
Devan Goodwin
49cb674f25 Merge pull request #278 from vrutkovs/tag_format_release
Custom tag support in tito release
2017-05-05 09:34:33 -03:00
Vadim Rutkovsky
aadafd4e87 Custom tag support in tito release
Signed-off-by: Vadim Rutkovsky <vrutkovs@redhat.com>
2017-05-05 12:35:23 +02:00
Devan Goodwin
1310954605 Merge pull request #277 from vrutkovs/releaseless_tagger
VersionTagger support for custom tag format
2017-05-02 08:51:00 -03:00
Vadim Rutkovsky
3a08af27ce VersionTagger should support custom tag format
It allows projects to format their own tags
2017-04-28 17:03:35 +02:00
Devan Goodwin
74e39e3dd8 Merge pull request #276 from Conan-Kudo/use-createrepo_c
Switch to using createrepo_c for creating rpm repos and drop end-of-life EL5 stuff
2017-04-10 08:45:42 -03:00
Neal Gompa
1906fbd900 Remove createrepo_c BR from spec
It's not even used while building the tito package...
2017-04-09 18:10:51 -04:00
Neal Gompa
cbaa09697f Use createrepo_c for creating rpm-md repos
createrepo_c is a faster and more correct implementation of
generating rpm repositories, used by Fedora, openSUSE, and Mageia
for creating official distro repositories. It is also used by COPR
for creating repositories for packages built through its system.
2017-04-01 18:27:19 -04:00
Neal Gompa
0929d2d296 Fixup Fedora Dockerfiles to work correctly
The test suite tests both Python 2 and Python 3, but the spec file
doesn't install both sets of dependencies, so we need to declare
the Python 2 dependencies to be installed in the Dockerfiles.

In addition, there's no reason to drag in yum-utils, since
"dnf builddep" exists and serves the same purpose.
2017-04-01 18:27:19 -04:00
Neal Gompa
18a21c6c5b Remove useless EL5 stuff
Red Hat Enterprise Linux 5 and its derivatives are now EOL.
2017-04-01 14:55:25 -04:00
Devan Goodwin
b5597fc429 Automatic commit of package [tito] release [0.6.10-1].
Created by command:

/usr/bin/tito tag
2017-02-01 10:51:34 -04:00
Devan Goodwin
4ac375ef6a F25 branches update. 2017-02-01 10:49:54 -04:00
Steve Kuznetsov
12d1eb49e9 Merge pull request #271 from stevekuznetsov/skuznets/init-options
Parse options in `tito init`
2017-01-30 09:31:35 -05:00