Commit graph

1071 commits

Author SHA1 Message Date
Jakub Kadlcik
bd1b8e1bf4 Add long_description to setup.py
I uploaded tito to PyPI, see https://pypi.org/project/tito/
and it says that

> The author of this package has not provided a project description

This should fix it.
2022-03-13 22:44:10 +01:00
Jakub Kadlcik
ed2d2e15e0 Release for EPEL9, don't release for F33 anymore 2022-02-23 12:47:18 +01:00
Jakub Kadlcik
201731715a Automatic commit of package [tito] release [0.6.20-1].
Created by command:

/usr/bin/tito tag
2022-02-23 12:35:54 +01:00
Nikos Moumoulidis
45d431ad14 Sync repo (in addition to tag) during mead build 2022-02-23 11:59:04 +01:00
Jakub Kadlcik
7177422ec9 Add 'Building RHEL packages with Tito' as external doc
http://frostyx.cz/posts/building-rhel-packages-with-tito
2021-09-24 02:25:05 +02:00
Jakub Kadlcik
bd7b56a93a Consider the current project git config when releasing to DistGit
I use two different email addresses for git config, depending on what
kind of project it is going on. I use my personal email address for
public community projects and my work email address for internal
repositories.

Let's say my global config is my personal address

    $ git config --get --global user.email
    frostyx@email.cz

And that I am working on an internal project, therefore I set

    git config user.email "jkadlcik@redhat.com"

Once I run `tito release internal`, I would like all changes to be
commited with my work address, i.e. I would like the local git user
config to be considered. This commit fixes that.
2021-09-13 00:21:43 +02:00
Jakub Kadlcik
0df894d613 Print the problematic binary files
The output will look like this:

    Binary files /dev/null and b/createrepo_mod/tests/packages/foo-3.0.10-3.fc33.noarch.rpm differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-other.xml.gz differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-filelists.sqlite.bz2 differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-other.sqlite.bz2 differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-primary.sqlite.bz2 differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-primary.xml.gz differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-filelists.xml.gz differ
    Binary files /dev/null and b/modulemd-merge/tests/testdata/repodata/foo-modules.yaml.gz differ
    ERROR: You are doomed. Diff contains binary files. You can not use this builder
2021-08-29 19:28:37 +02:00
Jakub Kadlcik
3a3039beb1 Release also for F35 2021-08-15 22:49:04 +02:00
Jakub Kadlcik
41f7cfd09f Automatic commit of package [tito] release [0.6.19-1].
Created by command:

/usr/bin/tito tag
2021-08-15 22:42:29 +02:00
Jakub Kadlcik
8e196799c8 Drop unused urllib.request import
Fix RHBZ 1982135
2021-07-16 22:16:56 +02:00
Jakub Kadlcik
6553a15948 Automatic commit of package [tito] release [0.6.18-1].
Created by command:

/usr/bin/tito tag
2021-06-23 21:32:50 +02:00
Jakub Kadlcik
a02aef69e5 Document fetch_sources option in tito.props 2021-06-23 20:36:06 +02:00
Jakub Kadlcik
971c39b5ed Rename fetch-sources to fetch_sources in the tito.props config
Complements PR #407

Every other `tito.props` config option uses underscores instead of
dashes, so let's preserve this convention.
2021-06-23 20:36:06 +02:00
Silvie Chlupova
5de167e0ff Adding option to fetch sources 2021-06-15 15:26:24 +02:00
Jakub Kadlcik
24b8f3d7d4 Change the master branch in releasers.conf to rawhide 2021-05-17 02:46:13 +02:00
Jakub Kadlcik
d6aeb8a29b Automatic commit of package [tito] release [0.6.17-1].
Created by command:

/usr/bin/tito tag
2021-05-17 02:37:35 +02:00
Jakub Kadlcik
23b24a289a Update releasers.conf 2021-05-17 02:36:56 +02:00
Nikos Moumoulidis
0729445d2f Make build --verbose autocompletable 2021-05-11 20:59:34 +02:00
William Poteat
883754e2e5 Add support for centpkg 2021-05-11 17:10:05 +02:00
Allen Reese
0dbcfc4554 Remove extraneous extra newline 2021-05-11 02:03:07 +02:00
Allen Reese
8570695097 Add some documentation for tito.builder.SubmoduleAwareBuilder 2021-05-11 02:03:07 +02:00
Allen Reese
71c2712e7e Update based on feedback:
1. Remove PushDir, tito.common.chdir has the same functionality so use that instead.
2. Remove useless override of constructor, it's just extra noise.
2021-05-11 02:03:07 +02:00
Allen Reese
f4251b30cd 150 Add support for repos that use submodules.
Allow though submodules are a contentious topic, this adds a submodule_aware_builder

This can be used with the following config in tito.props:

```
[buildconfig]
builder = SubmoduleAwareBuilder
```
2021-05-11 02:03:07 +02:00
Link Dupont
88699fdf0b doc: fix typo tito.props 2021-04-15 02:18:22 +02:00
Jakub Kadlcik
286d5e4131 Update fedora releaser in .tito/releasers.conf 2021-01-26 16:42:31 +01:00
Jakub Kadlcik
0cbcb8a5e8 Automatic commit of package [tito] release [0.6.16-1].
Created by command:

/usr/bin/tito tag
2021-01-26 16:34:24 +01:00
Pavel Raiskup
6198e4d203 Enable Packit pull-request CI
Enable it on all currently supported Fedora/EPEL architectures.

Packit doesn't support our way of preparing source RPMs via the command
'tito build --srpm --test', but creates it's own source RPM instead.
This doesn't seem to cause a practical problems, so we are good to go
for now till the Packit RFE is implemented:
https://github.com/packit/packit-service/issues/920

Fixes: #395
2021-01-12 17:45:46 +01:00
Jakub Kadlcik
d96c9c7d7a Stop running tests for F27 in favor of F33 2021-01-12 16:27:27 +01:00
Jakub Kadlcik
6a216b2ea6 Fix manpage generation on Fedora Rawhide (F34)
I believe this is a `a2x` bug, not ours, so I am just workarounding it until the
issue gets fixed. The error looks like this

    [root@449665d34a95 sandbox]# a2x -d manpage -f manpage tito.8.asciidoc --verbose
    a2x: args: ['-d', 'manpage', '-f', 'manpage', 'tito.8.asciidoc', '--verbose']
    a2x: resource files: []
    a2x: resource directories: ['/etc/asciidoc/images', '/etc/asciidoc/stylesheets']
    a2x: executing: "/usr/bin/asciidoc.py" --backend docbook -a "a2x-format=manpage"  --doctype manpage --verbose  --out-file "/home/sandbox/tito.8.xml" "/home/sandbox/tito.8.asciidoc"

    asciidoc: reading: /etc/asciidoc/asciidoc.conf
    asciidoc: reading: /home/sandbox/tito.8.asciidoc
    asciidoc: include: /home/sandbox/man.asciidoc
    asciidoc: tito.8.asciidoc: line 3: reading: /home/sandbox/man.asciidoc
    asciidoc: reading: /etc/asciidoc/docbook45.conf
    asciidoc: reading: /etc/asciidoc/filters/graphviz/graphviz-filter.conf
    asciidoc: reading: /etc/asciidoc/filters/source/source-highlight-filter.conf
    asciidoc: reading: /etc/asciidoc/filters/code/code-filter.conf
    asciidoc: reading: /etc/asciidoc/lang-en.conf
    asciidoc: writing: /home/sandbox/tito.8.xml
    asciidoc: include: /home/sandbox/AUTHORS
    asciidoc: tito.8.asciidoc: line 299: reading: /home/sandbox/AUTHORS

    a2x: executing: "xmllint" --nonet --noout --valid "/home/sandbox/tito.8.xml"

    I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
    /home/sandbox/tito.8.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
    D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
										^
    /home/sandbox/tito.8.xml:5: validity error : Validation failed: no DTD found !
    <refentry lang="en">
		    ^

    a2x: ERROR: "xmllint" --nonet --noout --valid "/home/sandbox/tito.8.xml" returned non-zero exit status 4
2021-01-12 16:27:27 +01:00
Jakub Kadlcik
d41626d181 Print filenames that doesn't comply PEP8
The old output was missing filenames, e.g.

    AssertionError: Found PEP8 errors that may break your code in Python 3:
    2       E201 whitespace after '['
    3       E202 whitespace before ']'
    2       E203 whitespace before ':'
    1       E221 multiple spaces before operator
    1       E302 expected 2 blank lines, found 1
    2       E303 too many blank lines (2)

That's now usefull at all. Where the heck should I search for these errors. The
new output is a little bit messy but contains more usefull information, e.g.

    AssertionError: Found PEP8 errors that may break your code in Python 3:
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:9:1: E302 expected 2 blank lines, found 1
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:17:66: E202 whitespace before ']'
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:21:15: E203 whitespace before ':'
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:22:16: E203 whitespace before ':'
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:26:18: E201 whitespace after '['
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:26:32: E202 whitespace before ']'
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:29:15: E201 whitespace after '['
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:29:32: E202 whitespace before ']'
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:35:17: E221 multiple spaces before operator
    /tito/test/unit/../../src/tito/release/LocalYumRepo.py:76:5: E303 too many blank lines (2)
2021-01-12 16:27:27 +01:00
Jakub Kadlcik
998f7fb067 Make tests working on systems without non-versioned python macros
See RHBZ 1784688

We are using unversioned python macros, such as `%__python` and
`%python_sitelib` which are not supported in Fedora rawhide
anymore. Instead, we should use `%__python3` and `%python3_sitelib`.
2020-10-12 11:39:27 +02:00
Jakub Kadlcik
861d15518e Ignore spectool warnings
Without this change, the spectool output can look like this

    [root@e15222e75294 pkg1]# spectool -S titotestpkg.spec | awk '{print $2}'
    warning: Macro expanded in comment on line 37: %{python3_sitelib}/%{name}

    titotestpkg-0.0.1.tar.gz

and then each of the lines is considered to be a SourceX file. We
should really ignore the warnings.
2020-10-06 21:44:14 +02:00
Jakub Kadlcik
00ee487ed2 Skip nonexisting extra sources
Make the `copy_extra_sources` method more foolproof and don't
traceback when a SourceX file doesn't exist.
2020-10-06 21:44:14 +02:00
Jakub Kadlcik
5947384f32 Fix copy_extra_sources for remote URLs
Fix #387

A build with a remote URL in its `SourceX` will work only with

    %_disable_source_fetch 0

macro defined. It can be done either globally via `~/.rpmmacros` or by
using tito with following parameter

    --rpmbuild-options="--define '%_disable_source_fetch 0'"

IMHO this macro should be set by default but we should also introduce
a switch to turn it off (like e.g. Mock or Copr do). Since it is not
related to fixing #387, I am not doing it in this commit.
2020-10-06 16:20:05 +02:00
Jiri Hnidek
d9ed1db7da Do not use absolute path to generate-patches.pl script
* When tito is installed using pip, then generate-patches is
  installed into the ~/.local/bin directory and the absolute
  path cannot work
2020-10-02 11:57:37 +02:00
Jakub Kadlcik
5575554c95 Use --no-rebuild-srpm for scratch builds in KojiReleaser
Fix #382
2020-08-11 18:00:04 +02:00
Jakub Kadlcik
2a9178dcf2 Automatic commit of package [tito] release [0.6.15-1].
Created by command:

/usr/bin/tito tag
2020-07-10 11:06:05 +02:00
Jakub Kadlcik
7f95272004 Do not release for F30 anymore 2020-07-10 10:59:41 +02:00
Jakub Kadlčík
0d4f1ccd38
Merge pull request #379 from praiskup/copy-extra-sources-fedora-releaser
FedoraGitReleaser: upload extra sources to lookaside cache
2020-06-13 23:11:22 +02:00
Pavel Raiskup
13331c7509 FedoraGitReleaser: upload extra sources to lookaside cache
Related to https://pagure.io/copr/copr/pull-request/1397
2020-06-11 09:49:33 +02:00
Jakub Kadlčík
15ecd02524
Merge pull request #378 from jirihnidek/master
When extra source file exist, then do not copy it
2020-05-28 13:25:12 +02:00
Jiri Hnidek
19fc14842b When extra source file exist, then do not copy it
* Extra source file can be copied/moved by some other tool
* When the source file already exists in destination path, then
  do not try to copy it once again
* This issue was observed, when we tried to build
  subscription-manager on Fedora 32 using tito
2020-05-28 13:00:46 +02:00
Jakub Kadlcik
1ec010e0cd Automatic commit of package [tito] release [0.6.14-1].
Created by command:

/usr/bin/tito tag
2020-05-04 11:46:23 +02:00
Jakub Kadlčík
b9fc2a3f5e
Merge pull request #376 from FrostyX/fix-copy-extra-sources
Fix copy_extra_sources for alternative builders
2020-05-04 10:58:08 +02:00
Jakub Kadlčík
29125932ff
Merge pull request #375 from FrostyX/projects-managed-with-tito
Add a list of projects using tito
2020-05-04 10:56:12 +02:00
Jakub Kadlčík
27cb63e043
Merge pull request #374 from FrostyX/less-aggressive-yes-or-no
Make yes or no input less aggressive
2020-05-04 10:55:53 +02:00
Jakub Kadlčík
1602fbe8db
Merge pull request #373 from FrostyX/optional-bugzilla
Move bugzilla code to a separate file
2020-05-04 10:55:27 +02:00
Jakub Kadlčík
1fcecdb77f
Merge pull request #370 from FrostyX/tito-init-existing
Separate .tito directory creation from tito.props file creation
2020-05-04 10:54:24 +02:00
Jakub Kadlcik
c3c1de77cc Fix copy_extra_sources for alternative builders
Fix #367

We accidentally introduced `copy_extra_sources` method as a part of
`BuilderBase` class. Which wouldn't be a problem, except for the fact
that its implementation uses properties, that are not a part of
that class but are rather defined in **some** of its descendats.

Let's define this method only abstractly and let more specific
builder classes to provide their own implementation if it makes
sense for them.
2020-04-26 22:51:49 +02:00
Jakub Kadlcik
a087b017d0 Add a list of projects using tito
Fix #243
2020-04-26 14:59:38 +02:00