The refactoring of YumRepoReleaser into RsyncReleaser and
YumRepoReleaser caused a regression that didn't allow multiple rsync
locations to be defined and sync'd properly.
Moved a bunch of code around and adding of method variables to
allow multiple rsync and tempdirs to be used.
Use regular expression to extract the SHA1 from the `git ls-remote` call
response. The reason is that there might be some messages in the
response going to stderr, that are captured when using run_command,
e.g.:
```
Could not chdir to home directory /home/johndoe: No such file or directory
fe87e2b75ed1850718d99c797cc171b88bfad5ca refs/tags/my-awesome-lib-1.0.1-1
```
I used 30 and more characters for the regular expression because I was
not sure the SHA1 is always shown as 40 characters. However we can be
quite certain that the word of 30 and more [0-9a-f] characters is a
SHA1.
RsyncReleaser takes an optional argument "filetypes" from releasers.conf
which specifies what type of packages should be rsynced
[rsync_test-example]
releaser = tito.release.RsyncReleaser
builder = tito.builder.MockBuilder
builder.mock = fedora-16-x86_64
filetypes = tgz rpm srpm
rsync = /tmp/rsync_repo/
in case of YumRepoReleaser default filetypes is of course only rpm.
For releasers copying into a build system SCM, we now extract the
SourceX filenames from the spec file, and anything we see in the
relative directory matching those exactly will be copied. (i.e. if you
store additional sources for your package at the same level as your spec
file, these will now be copied)
MockBuilder was assuming your package would build fine with the normal
builder, anything using NoTgzBuilder (or others likely) would break.
Now we will instantiate a builder internally, whatever the package would
use by default, and use this to build just the srpm before handing it
off to mock.
Because we treat this directory as a per-user directory (tito doesn't
work well on a multi-user system, users have to configure their own
output dirs with RPMBUILD_BASEDIR=~/tito/ in ~/.titorc), it seems best
to do this internally to tito rather than try to handle the permissions
in a spec file that won't know who should actually own it.
Adding "builder.test = 1" to a target in releasers.conf will allow you
to submit test builds out to a yum repository. This can be useful for
automated nightly builds. This is done as a builder arg rather than a
CLI argument to prevent anyone from accidentally doing a --test release
for something important. Instead it is a feature you configure once for
your targets.
Instead using a kwargs solution for optional things to be passed
through. Will allow for easier use of builders in other components which
do not have a set of CLI args to pass in. (i.e. releasers)
We keep getting permission denied with trying to set time on directories.
According to the rsync man page:
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
Hrm so what do those mean?
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-D same as --devices --specials
-p, --perms preserve permissions
-t, --times preserve modification times
So by having -a, that means -t automatically gets added which is not
what we want. And in some cases we were adding -no-p and -no-g
again added because -a includes them.
So by switching to -rlvz we avoid all these problems.
This adds a new option, changelog_format, which allows specifying the
full format of generated changelog entries. This also deprecates use
of changelog_with_email, since it is a subset of a fully-customizable
changelog format.
Currently EDITOR is assumed to be a single word (e.g. 'vi') and does
not handle and editor with arguments (e.g. 'emacs --quick -nw') due to
the way subprocess.call is invoked. This patch allows either to work
in both VersionTagger._make_changelog and
CvsReleaser._cvs_user_confirm_commit_msg.