Commit graph

946 commits

Author SHA1 Message Date
Brian C. Lane
8387e57608 Enable GnuPG signed tags
Add 'sign_tag = 1' to the [buildconfig] section of tito.props to enable
it.
2019-07-30 11:51:41 -07:00
Devan Goodwin
86dc621bf4
Merge pull request #336 from awood/master
Fix UnicodeDecodeError caused by source tarballs with utf8 names.
2019-04-10 15:51:39 -03:00
Alex Wood
03509b36d5 Fix #335. Handle source tarballs with UTF8 characters in the name.
Following the principals of https://nedbatchelder.com/text/unipain.html
our goal is to decode bytes in to unicode as soon as we read them and
encode unicode date to bytes at the last second.

The specific problem we were seeing was caused by calling "encode" on a
byte string rather than a unicode string.  Python attempts to be
"helpful" and tries to decode the bytes as ASCII in order to provide a
unicode string to the encode function.  Since the bytes aren't ASCII,
the decode fails and we get the UnicodeDecodeError despite the fact that
we never explicitly asked for a decode at all.

Also, calculate checksums correctly for tarballs that have files with
UTF8 characters in the file name.
2019-04-10 14:20:02 -04:00
Alex Wood
77d54e6579 Add missing dependency declarations. 2019-04-09 14:34:23 -04:00
Alex Wood
fc12574880 BuildRoot is long deprecated and caused tests to fail. 2019-04-08 17:10:17 -04:00
Devan Goodwin
9ef7874044
Merge pull request #327 from kahowell/fedora_distgit
Do not touch tests/ or gating.yaml in dist-git
2018-11-30 07:51:15 -04:00
Kevin Howell
38ea08981b Do not touch tests/ or gating.yaml in dist-git
- `tests/` is part of Fedora's Standard Test Interface (see https://fedoraproject.org/wiki/CI/Standard_Test_Interface )
- `gating.yaml` is part of Fedora's CI/Gating (see https://fedoraproject.org/wiki/CI/Gating )
2018-11-29 16:50:19 -05:00
Devan Goodwin
801ceef051
Merge pull request #326 from bby-bishopclark/patch-1
Don't pluralize with apostrophes
2018-10-12 14:47:24 -03:00
bby-bishopclark
98a517554b
Don't pluralize with apostrophes
Apostrophes aren't for pluralization.  Let's avoid that.
2018-10-12 10:29:41 -07:00
Devan Goodwin
1d311e7916
Merge pull request #325 from Conan-Kudo/susetagger
Add support for SUSE-style detached changelogs
2018-09-17 08:02:58 -03:00
Neal Gompa
b0e2d57934 Releaser: Ensure rpmlintrc files are copied when releasing
A number of build systems support using <pkg>.rpmlintrc for
rpmlintrc files that are used and associated with a specific
package build. These should be committed and pushed when
releasing with tito.
2018-09-16 20:46:33 -04:00
Neal Gompa
597e4de1e0 Releaser: Ensure SUSE-style changes file is copied when releasing
Since we support the case with a SUSE-style detached changelog,
we need to ensure that the changes file is going to be committed
when tito makes a release and pushes it.
2018-09-16 18:34:35 -04:00
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