Fedora-App-ReviewTool

 view release on metacpan or  search on metacpan

lib/Fedora/App/ReviewTool.pm  view on Meta::CPAN

        map { s/^CN=//; s/,$//; $_} 
        grep { /^CN/ } 
        split /\s+/, $self->cert->subject
        ; 

    shift @cns;
}

#############################################################################
# common startup stuff

sub startup_checks {
    my $self = shift @_;

    #warn "here";

    die '$HOME is not set!' . "\n" unless exists $ENV{HOME};

    die "~/.fedora.cert does not exist!\n" 
        unless file($ENV{HOME}, '.fedora.cert')->stat;

    my @files = 
        map { file $ENV{HOME}, $_ } 
        qw{ .fedora-server-ca.cert .fedora-upload-ca.cert }
        ;

    for my $file (@files) {

        warn "$file does not exist; koji builds may be impacted!\n"
            unless $file->stat;
    }

    return;
}

#############################################################################
# template bits

has _tt2 => (is => 'ro', isa => 'Template', lazy_build => 1);
sub _build__tt2 { Template->new() }

sub _from_template {
    my $self = shift @_;
    my $tmpl = shift @_;
    my %args = @_;

    my $ret;

    $self->_tt2->process(
        $self->section_data($tmpl),
        \%args,
        \$ret,
    );

    return $ret;
}

# template shortcuts
sub verbose_description { shift->_from_template('verbose_description', @_) }
sub branch              { shift->_from_template('branch', @_)              }
sub update              { shift->_from_template('update', @_)              }
sub new_tix             { shift->_from_template('new_tix', @_)             }
sub verbose_submit      { shift->_from_template('verbose_submit', @_)      }
sub import_task_review  { shift->_from_template('import_task_review', @_)  }

1;

__DATA__
__[ review ]__

TEST REVIEW TEMPLATE

- comments here -

koji: [% koji_url %]

NOTE: License auto-detection only works for perl, and not even there yet.

Spec looks sane, clean and consistent; license is correct ([% license %]);
make test passes cleanly.

Source tarballs match upstream (sha1sum):
[% FOREACH pkg = sha1sum.keys.sort -%]
[% sha1sum.$pkg %] [% pkg %]
[% END -%]

Final provides / requires are sane:

[% rpmcheck %]
__[ update ]__
Spec URL: [% spec %]
SRPM URL: [% srpm %]

[% IF koji -%]
Koji build: [% koji %]
[% END -%]
__[ new_tix ]__
Spec URL: [% spec %]
SRPM URL: [% srpm %]

Description:
[% description -%]

[% IF koji -%]

Koji build: [% koji %]
[% END -%]
[% IF additional_comment -%]

Additional Comment:

[% additional_comment %]
[% END -%]

*rt-[% version -%]
__[ branch ]__
New Package CVS Request
=======================
Package Name: [% name %]
Short Description: [% summary %]
Owners: [% owners %]



( run in 0.916 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )