Add `koji' option to redefine Koji client
[Fedora-Rebuild.git] / lib / Fedora / Rebuild / Package / Config.pm
blobc55676354a9d18451dc5766ddc9b7cb6dbe42e19
1 package Fedora::Rebuild::Package::Config;
2 use strict;
3 use warnings;
4 use version 0.77; our $VERSION = version->declare("v0.12.1");
6 use Moose;
7 use Fedora::Rebuild::Types qw( Mode );
8 use namespace::clean;
10 =encoding utf8
12 =head1 Fedora::Rebuild::Package::Config
14 Configuration for building a package. This object and its members are not
15 shared.
17 =head2 Constructor arguments and read only accessors
19 =head3 mode
21 A C<Mode> type.
23 Pass C<local> for committing and building locally only,
24 pass C<mock> for committing localy and building in mock,
25 pass C<koji> for pushing commits and building in Koji.
27 =cut
29 has 'mode' => ( is => 'ro', isa => Mode, required => 1);
31 =head3 pyrpkg
33 A string with a program name used for handling package dist-git repositories.
34 The program must implement I<pyrpkg> front-end, like I<fedpkg> does.
36 =cut
38 has 'pyrpkg' => ( is => 'ro', isa => 'Str', required => 1);
40 =head3 koji
42 A string with a program name used for building in Koji-like build service.
43 The program must implement I<koji> command interface.
45 =cut
47 has 'koji' => ( is => 'ro', isa => 'Str', required => 1);
49 =head3 repositories
51 Reference to array of repository URLs. Usually points to Fedora mirror or
52 Koji repository (baseurl in YUM terminology). This is needed for C<mock>
53 build C<mode>.
55 =cut
57 has 'repositories' => ( is => 'ro', isa => 'ArrayRef[Str]', required => 1);
59 =head3 architecture
61 RPM architecture name, e.g. C<x86_64>.
63 =cut
65 has 'architecture' => ( is => 'ro', isa => 'Str', required => 1);
67 =head3 mock_install_packages
69 YUM packages to install at mock chroot initialization. Separate them by
70 a space. C<@buildsys-build> is needed for mirrored Fedora repositories
71 C<@build> is needed for direct koji repositories.
73 =cut
75 has 'mock_install_packages' => ( is => 'ro', isa => 'Str', required => 1);