Commit graph

1133 commits

Author SHA1 Message Date
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
Jakub Kadlcik
ad74e00a77 Make yes or no input less aggressive
Fix #364

Previously all non-yes input was considered to be "no". Which is not
what we typically want. There should be expected "yes" inputs, expected
"no" inputs and everything else should be considered to be an uknown
input and should be treated this way.

I think that printing an error for unknown input is too verbose and have
no added value. Simply repeating the question is the way to go here:

    ##### Please review the above diff #####
    Do you wish to proceed with commit? [y/n] foo
    Do you wish to proceed with commit? [y/n] y
    Proceeding with commit.
2020-04-26 14:13:35 +02:00
Jakub Kadlcik
ecd5718f62 Define a small abstraction for mocking builtins
It's better to do the python2 and python3 compatibility magic on
one place rather than having having `if PY2` conditions everywhere
and figuring whether to use `builtins.foo` or `__builtin__.foo
over and over again.
2020-04-26 14:13:35 +02:00
Jakub Kadlcik
3a62bb6613 Move bugzilla code to a separate file
Fix #358

Previously the bugzilla-specific code was implemented in `tito.common`
which is imported from everywhere. Therefore missing dependency
to `python3-bugzilla` resulted in failure even for simple commands
such as `tito build --tgz`.
2020-04-24 18:22:17 +02:00
Jakub Kadlčík
6e1ebf4a3f
Merge pull request #372 from FrostyX/changelog-datetime
Add a possibility to have full datetime entries in changelog
2020-04-24 17:54:31 +02:00
Jakub Kadlcik
219efc50a2 Add a possibility to have full datetime entries in changelog
Fix #305

Unfortunatelly we need to use `pytz` instead of `datetime.timezone`
because of python2.
2020-04-24 17:41:00 +02:00
Jakub Kadlcik
3e5450a533 Separate .tito directory creation from tito.props file creation
Fix #158

As a consequence we can easily print a different message when running
`tito init' an already initialized tito project.
2020-04-23 11:51:35 +02:00
Jakub Kadlčík
e3173db770
Merge pull request #368 from FrostyX/init-path-with-space
Use mkpath instead of running mkdir -p command
2020-04-23 11:50:23 +02:00
Jakub Kadlcik
a72d4fbe50 Move is_rawhide and is_epel6 definitions to __init__ so other tests can use it 2020-04-23 11:35:03 +02:00
Jakub Kadlčík
754c2f72bc
Merge pull request #371 from FrostyX/version-template
Implement --version parameter
2020-04-20 09:59:09 +02:00
Jakub Kadlčík
09ffde545a
Merge pull request #369 from FrostyX/filedigest-md5
Do not specify file digest algorithms
2020-04-20 09:58:16 +02:00
Jakub Kadlcik
d73495afa8 Use os.makedirs instead of running mkdir -p command
Fix #338

We want to use as few bash commands instead of python functions as
possible anyway, but this rewrite fixes #338
2020-04-19 00:29:09 +02:00
Jakub Kadlcik
40287ca668 Do not specify file digest algorithms
Fix #331

Do not specify `_source_filedigest_algorithm`
and `_binary_filedigest_algorithm` anymore

EPEL5 did understand only MD5 checksums but since it is EOLed and
newer releases know SHA, we can probably safely remove it.
2020-04-18 21:05:59 +02:00
Jakub Kadlcik
0407099f24 Implement --version parameter
Fix #187
2020-04-18 20:52:40 +02:00
Jakub Kadlcik
2c61072cdc Use template to generate file with __version__
Fix #252
2020-04-18 20:51:26 +02:00
Jakub Kadlčík
df8df65bde
Merge pull request #365 from rpm-software-management/irc
mention the #tito irc channel in the readme
2020-04-18 16:48:35 +02:00
Jakub Kadlcik
f7f5fb2c8c mention the #tito irc channel in the readme 2020-04-14 00:14:31 +02:00
Jakub Kadlčík
f71033d7ce
Merge pull request #361 from FrostyX/maintenance-documentation
Describe how to release tito
2020-04-07 19:59:37 +02:00
Jakub Kadlcik
57287ec902 Describe how to release tito 2020-04-07 19:42:19 +02:00
Jakub Kadlčík
d602fcbf32
Merge pull request #362 from FrostyX/project-namespace
Move tito under rpm-software-management namespace
2020-04-06 02:30:35 +02:00
Jakub Kadlcik
4edf7e4533 Move tito under rpm-software-management namespace 2020-03-30 15:35:13 +02:00
Jakub Kadlcik
3e06357df7 Automatic commit of package [tito] release [0.6.13-1].
Created by command:

/usr/bin/tito tag
2020-03-29 01:35:57 +01:00
Jakub Kadlcik
74c6b65957 Update fedora releaser branches 2020-03-29 01:29:40 +01:00
Jakub Kadlčík
0f78f4b155
Merge pull request #354 from FrostyX/source1
Allow including macros through SourceX
2020-03-29 01:20:56 +01:00
Jakub Kadlcik
6c75185c87 Use spectool instead of manually parsing the specfile 2020-03-26 18:58:42 +01:00
Jakub Kadlcik
75715dc162 copy symlinks 2020-03-26 18:58:42 +01:00
Jakub Kadlcik
387757e0be Define _sourcedir for get_project_name RPM query
Follow-up for be89941
Fix: #311
Supersedes: #313

The `get_project_name` function is called in an early phase when
the temporary `SOURCES` directory for a current build doesn't exist yet.
Therefore as a little workaround, we set `_sourcedir` to an upstream
directory containing the package spec file.

Defining a custom `_sourcedir` (and therefore not using
`~/rpmbuild/SOURCES`) shouldn't be a problem because tito builds
should not depend on anything outside of the upstream git repository.

The use-case described in PR#313 works as expected.

    SOURCE1: somecool.macros
    %include %{SOURCE1}

For multi-spec projects, where you have e.g

    .
    ├── foo
    │   ├── foo.spec
    ├── bar
    │   ├── bar.spec

It is possible to include the common macros from a parent (or some
other) directory by having a symlink.

    cd foo
    ln -s ../somecool.macros ./

Or possibly some other way which I am currently not aware of
because I wasn't able to e.g. persuade `%include` to include from
the parent directory.
2020-03-26 18:58:42 +01:00
Daniel Hilst Selli
d9cbc94840 Add _copy_extra_sources() method to BuilderBase class.
This method will include extra SOURCE1, SOURCE2, ... SOURCE<N>
files to the source rpm. This fix "No such file or directory" for
included source files.
2020-03-26 18:58:42 +01:00
Jakub Kadlčík
1e70e59cff
Merge pull request #356 from FrostyX/fix-travis-2
Fix travis CI tests for Fedora Rawhide
2020-03-26 18:34:21 +01:00
Jakub Kadlcik
a8e03d8361 Do not run external ls -lR command to debug directory content
When running tests for fedora rawhide in Travis, this debug line
fails with following error:

    Command output: ls: cannot access
    '/tmp/tmpjw15wzfs-titotest/rpmbuild-titotestpkg24v2hy67/SOURCES/titotestpkg-0.0.1/':
    Operation not permitted

Even when changing the debug line to just

    debug('', 'ls -l /')

it still fails. Let's just use `os.listdir`
2020-03-26 03:33:58 +01:00
Jakub Kadlčík
64e571540b
Merge pull request #272 from tjanez/modernize-python-package
Modernize Python package
2020-03-24 13:41:14 +01:00
Tadej Janež
df07df3eda
Rename HACKING to HACKING.md so it renders on GitHub 2020-03-24 09:25:46 +01:00
Tadej Janež
6f5a455aac
Modernize developer installation
Support the popular pip editable installation mode.

To work-around a problem in setuptools' develop target, generalize
'install_dir' to say all packages are in 'src' (for more info, see:
https://github.com/pypa/pip/issues/126).

Remove pre-generated bin/tito-dev script.
2020-03-24 09:25:44 +01:00
Tadej Janež
46bc5ab1a1
Update source installation instructions
Instruct users how to install dependencies and then install tito via
so-called User install.
2020-03-24 09:25:43 +01:00
Tadej Janež
9820841af5
Automatically create tito's console script
Create tito.cli.main() which serves as command line's entry point that
can be used:
- by setuptools' 'console_scripts' entry point mechanism for automatic
  script creation,
- via 'if __name__ == "__main__":'.

Remove pre-generated bin/tito script.

Update SPEC file.
2020-03-24 09:25:41 +01:00
Jakub Kadlčík
805ce9ca4a
Merge pull request #340 from adamladd17/patch-1
Update common.py
2020-03-09 18:11:47 +01:00
Jakub Kadlčík
3bb01ebb56
Merge pull request #333 from evgeni/get_project_name
make get_project_name more resilient
2020-03-09 10:40:17 +01:00
Jakub Kadlčík
d2cc16064c
Merge pull request #351 from FrostyX/fix-source0-url-and-prep
Fix the Source0 URL and prep phase
2020-02-01 17:16:50 +01:00
Jakub Kadlčík
be4ebadf5e
Merge pull request #353 from FrostyX/fix-travis
Fix travis
2020-02-01 17:00:55 +01:00