No `README.mkd` file exists, but `README.md` does. No files ending in
`.5` exist, but some manpages that end in `.5.asciidoc` do.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
The current output levels from `tito build` are both very verbose in the
case that nothing goes wrong and often missing full context when some-
thing does go wrong. By exposing `--quiet` and `--verbose`, the build
process should be able to modulate the amount of output coming from the
internal process and from `rpmbuild`.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
While file handles support the `.flush()` method, some of the more
UNIX-ey pipes and tees do not. We should try to `.flush()` when we
can, but not bother when we can't.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Running the entire suite of containerized tests across all of the
platforms that are supported takes quite a while, especially if the
container images need to be built. Now, the platforms that are to be
tested can be specified with `$PY2_DISTROS` and `$PY3_DISTROS`.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
While the `tito.VersionTagger._get_new_tag()` method encapsulated some
of the version->tag mapping logic, other areas in the `VersionTagger`
used their own logic to do the mapping. This commit ensures that this
mapping happens in one place, which allows for custom implementations
to override the behavior simply.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When debugging is turned on and a command is run that fails or with
`print_on_success` on, the output for the command execution ends up
being printed twice. This change ensures that only one set of output
is printed at any point.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When using `$DEBUG=1`, often the output from different parts of `tito`
that output to different streams (for instance, `stderr` and `stdout`)
appears in the terminal in a garbled order. Furthermore, the stacktraces
generated by the Python interpreter are out of order with the output
from the `tito` process and often fragmented. By flushing the output
buffers on `tito.common._out()` we should be able to work around this.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When using `tito build --install` on a system without `sudo`, such as
inside of a Linux container build, the current implementation fails.
Furthermore, if the user is running `tito build --install` with the
correct level of privilege, it is not necessary to escalate privileges
further for the installation step.
This patch adds the `--dont-escalate-privileges` flag to `tito build`
and defaults it to `True`, which keeps the behavior backwards compat-
ible. Users will want to use this flag when building RPMs inside of a
container or when running `tito build` with the requisite permissions
for installing in the first place.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When a custom implementation of a tito Tagger is used, the mapping
function that is used to generate a tag from a version in the custom
Tagger must also be used in whichever tito Builder is used on that
repository. This commit factors out the mapping of version to tag so
that custom implementations of a Builder can inject custom logic here
with minimal effort, as is possible on the tito.VersionTagger by
overriding the _get_new_tag() function.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
In 26b02a7, the utility of the `ForceVersionTagger` was merged with the
base `VersionTagger`, so it is no longer necessary to ever explicitly
invoke the `ForceVersionTagger` class. Furthermore, the `elif` and
`else` branches of the decision tree for the tagger class were identical
in the previous implementation, so they were collapsed as well. The
remaining tagger class assignment is a simple query of the `tito.props`
file.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
From the looks of it, the `globalconfig` section is deprecated and
adding anything to that section of `tito.props` results in an error:
WARNING: Please rename [globalconfig] to [buildconfig] in tito.props
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When tests fail, artifacts from that tests are necessary to properly
debug the failure and determine how to fix the test. This is impossible
when artifacts are immediately removed after the test is finished.
Instead, the tests should remove old artifacts before the test run
begins.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
The logic that previously existed for updating the version and/or the
release in the specfile contained a lot of repetition and enough boolean
logic that it was becoming hard to read. By simplifying that stanza, the
hope is that the resulting code is easier to understand.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When multiple tags exist for one version of a project, or when a version
is passed to `tito tag --use-version` that does not exactly correspond
with a tag in the repository's git history, the auto-generated release
is not guaranteed to monotonically increase. In order for users to
overcome this issue without building complicated logic into `tito`, it
is simpler to allow users to provide a literal release string to use.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
To allow the tests to run from a host with SELinux enabled, the data
needs to be relabeled to the correct SELinux contexts. Adding the `Z`
label to the volume mount allows for this to occur.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>