view release on metacpan or search on metacpan
- Fix MANIFEST file and other minor packaging bugs
0.80 Fri Aug 20 14:05:34 CEST 2010
- Rewrote the whole web UI in Mojolicious instead of CGI::Application
- Encode packager name correctly
- Add information about the remote repository synchronization status
(see web_ui:check_remote_repo configuration key)
- Add a button to easily synchronize the remote repository
- When approving all packages, honour the comments, priority and
section for each package
- Add an option to see (and import) uploader GPG keys on the web UI
- Add createdistribution command to arepa-admin
- Improve the installation instructions considerably
- Minor improvements in administration tasks
- Deprecate web_ui:cgi_base_url, not needed anymore
- Add a new configuration key, web_ui:public_url, which will be used
for the RSS feeds and other "public URL" needs
- Make the Arepa::BuilderFarm tests more reliable, they should always
pass now on CPANTS
0.76 Tue Jul 13 11:27:33 CEST 2010
t/config-repo-test.yml
t/config-test.yml
t/fixtures/build-results/lenny32/qux_1.0-1_i386.deb
t/fixtures/qux_1.0-1.dsc
t/fixtures/qux_1.0-1.tar.gz
t/fixtures/qux_1.0-1_i386.build
t/fixtures/qux_1.0-1_i386.changes
t/repo-test/conf/distributions
t/Test/Arepa.pm
t/Test/Arepa/T01Smoke.pm
t/upload_queue/dhelp_0.6.15.dsc
t/upload_queue/dhelp_0.6.15.tar.gz
t/upload_queue/dhelp_0.6.15_all.deb
t/upload_queue/dhelp_0.6.15_i386.changes
t/upload_queue/experimental-package_1.0.dsc
t/upload_queue/experimental-package_1.0.tar.gz
t/upload_queue/experimental-package_1.0_i386.build
t/upload_queue/experimental-package_1.0_i386.changes
t/upload_queue/experimental-package_1.0_i386.deb
t/upload_queue/foobar_1.0-1.dsc
t/upload_queue/foobar_1.0-1.tar.gz
t/upload_queue/foobar_1.0-1_all.deb
t/upload_queue/foobar_1.0-1_i386.changes
t/upload_queue/multiarch2_1.0-1.dsc
t/upload_queue/multiarch2_1.0-1.tar.gz
t/upload_queue/multiarch2_1.0-1_i386.changes
t/upload_queue/multiarch2_1.0-1_i386.deb
t/upload_queue/multiarch_1.0-1.dsc
t/upload_queue/multiarch_1.0-1.tar.gz
t/upload_queue/multiarch_1.0-1_i386.changes
t/upload_queue/multiarch_1.0-1_i386.deb
t/upload_queue/qux_1.0-1.dsc
t/upload_queue/qux_1.0-1.tar.gz
t/upload_queue/qux_1.0-1_amd64.deb
t/upload_queue/qux_1.0-1_i386.build
t/upload_queue/qux_1.0-1_i386.changes
t/upload_queue/qux_1.0-1_i386.deb
t/upload_queue/qux_1.0-2_i386.deb
t/webui/001-test-class-suite.t
t/webui/conf/default/builders/test-builder.yml
t/webui/conf/default/config.yml
t/webui/conf/default/distributions
t/webui/conf/default/fixtures/test-builder/foobar_1.0-1_all.deb
t/webui/conf/default/fixtures/test-builder/foobar_2.0-1_all.deb
t/webui/conf/users.yml
t/webui/fixtures/foobar_1.0-1.dsc
t/webui/fixtures/foobar_1.0-1.tar.gz
t/webui/fixtures/foobar_1.0-1_i386.build
config.yml-sample view on Meta::CPAN
# remote_path: machine:/var/www/virtual/aptrepo/html/debian/
signature:
# Sign the repository with this ID. This is useful in case you might login
# with the wrong user and end up signing the repo with the wrong key
# id: 12345678
# The SPECIAL VALUE 'unsigned' means that the repository shouldn't be
# signed. This is useful mostly so that automated tests don't require
# having gpg installed
# URL to the repo. NO NEED to add a trailing slash
# url: http://localhost/arepa/repository
# Where the upload queue is (some anonymous FTP upload directory, or
# SSH-accesible queue or whatever)
upload_queue:
path: /var/arepa/upload-queue
# SQLite package database with compilation requests and other stuff
package_db: /var/arepa/db/package.db
web_ui:
# Public URL (to use in RSS feeds)
public_url: http://localhost/cgi-bin/arepa/arepa.cgi
# Base URL for CSS files and stuff
base_url: /arepa
# The trusted public keys (for package signatures) should be here
gpg_homedir: /var/arepa/gnupg-web
# Check if the remote repository is in sync with the local copy. Be sure to
* Create the postinst scripts so /var/arepa/gnupg-web is created on package
installation (see --list-keys and the contents of the default option file
inside it)
* Create a default keyring with the Opera key, and make it part of the
distribution (use it for the initial /var/arepa/keyring/uploaders.gpg)
* Figure out some permissions for package.db that work for both www-data and
arepa-master. Should package.db be created by default as an empty database?
* The user, after installation, will have to "su - arepa-master" and create a
new GPG key for it. The secret key ID should be in the configuration
* Make www-data be part of a new group, arepa. That group should be the group
for all the interesting directories, and those directories should have the
gid bit set.
* Have to set the umask to 0002 to reprepro creates the files with the
install_arepa.pl view on Meta::CPAN
if (!defined $web_gid) {
print STDERR "ERROR: Group '$web_group' doesn't exist\n";
exit 1;
}
my $package_db_path = $config->get_key("package_db");
foreach my $path (dirname($package_db_path),
$config->get_key("repository:path"),
File::Spec->catfile($config->get_key("repository:path"),
"conf"),
$config->get_key("upload_queue:path"),
$config->get_key("dir:build_logs")) {
print "Creating directory $path\n";
mkpath($path);
chown($uid, $gid, $path);
symchmod("g+w", $path);
}
my $builder_dir = "/etc/arepa/builders";
print "Creating builder configuration directory $builder_dir\n";
mkpath($builder_dir);
install_arepa.pl view on Meta::CPAN
if (! -f $gpg_options) {
print "Creating options file $gpg_options\n";
my $keyrings_dir =
File::Spec->catfile(dirname($config->get_key("web_ui:gpg_homedir")),
"keyrings");
mkpath($keyrings_dir);
chown($uid, $gid, $keyrings_dir);
symchmod("g+w", $keyrings_dir);
open F, ">$gpg_options";
print F "keyring $keyrings_dir/uploaders.gpg\n";
close F;
chown($uid, $gid, $gpg_options);
symchmod("g+w", $gpg_options);
}
lib/Arepa.pm view on Meta::CPAN
=head1 DESCRIPTION
Arepa (Apt REPository Assistant) is a suite of tools to manage a Debian
package repository. It has the following features:
=over 4
=item
Manages the whole process after a package arrives to the upload queue (say,
after being uploaded by C<dput>): checking its signature, approving it,
re-building it from source, updating the repository and signing it, and
optionally sending the repository changes to another server (e.g. the
production static web server serving the repository).
=item
You approve source packages, which then are compiled to any combination of
architecture and distribution you want.
=item
lib/Arepa.pm view on Meta::CPAN
Configure your C<sudo> so users in the group C<arepa> can execute
C</usr/bin/arepa sign>, C</usr/bin/arepa sync> and C</usr/bin/arepa issynced>.
You can add these lines in C<visudo>:
%arepa ALL = (arepa-master) NOPASSWD: /usr/bin/arepa sign
%arepa ALL = (arepa-master) NOPASSWD: /usr/bin/arepa sync
%arepa ALL = (arepa-master) NOPASSWD: /usr/bin/arepa issynced
=item
Add the keys of the developers that will upload packages to the uploader
keyring (C</var/arepa/keyrings/uploaders.gpg>). You can do that in the web
interface itself.
=back
Note that your upload queue is by default at C</var/arepa/upload-queue>, but
you can change it in the configuration file C</etc/arepa/config.yml>.
=head2 CREATE AUTOBUILDERS
Finally, you need to create an autobuilder for every combination of
distribution and architecture you want (in this case, let's say
C<mysqueeze>/C<amd64> and C<mylenny>/C<amd64>). If you are in an amd64
environment, you can create a builder for the i386 architecture by passing the
special option C<--arch i386> to C<arepa-admin createbuilder>.
lib/Arepa/Builder.pm view on Meta::CPAN
# This is the distribution the packages compiled by this builder go to. For a
# package to be compiled by this builder, it has to have the correct
# architecture and this distribution (or an alias or similar, see below) in
# its *.changes file.
distribution: $distribution
# Other names for this distribution (if the distribution name is
# mycompany-squeeze, you might want 'squeeze' and 'testing' as aliases)
distribution_aliases: []
# Recompile packages (binNMU or Binary-only Non-Maintainer Upload; see
# http://www.debian.org/doc/developers-reference/pkgs.html#nmu-binnmu)
# originally uploaded for other distributions in this builder. This option is
# an easy way to get "for free" packages compiled for several distributions.
# Typical values for this list would be 'unstable' or 'lenny'
bin_nmu_for: []
EOD
my $builder_name = basename($builder_dir);
my $path = File::Spec->catfile($opts{builder_config_dir},
"$builder_name.yml");
open F, ">$path" or croak "Can't write builder configuration in $path";
print F $config_string;
lib/Arepa/Config.pm view on Meta::CPAN
would pass a single path for the main configuration, and the builder
configuration would be loaded from the directory C<builders> inside the same
parent directory as the main configuration file. However, if you want you can
specify a custom directory to load the builder configuration from.
This is an excerpt of an example configuration file:
---
repository:
path: /home/zoso/src/apt-web/test-repo/
upload_queue:
path: /home/zoso/src/apt-web/incoming
package_db: /home/zoso/src/apt-web/package.db
web_ui:
base_url: http://localhost
user_file: /home/zoso/src/apt-web/repo-tools-web/users.yml
This is an example of a builder configuration file (say, C<squeeze32.yaml>):
---
type: sbuild
lib/Arepa/Web/Dashboard.pm view on Meta::CPAN
my %source_pkg_attrs =
$packagedb->get_source_package_by_id($comp->{source_package_id});
push @pending_compilations, {
%$comp,
package => { %source_pkg_attrs },
};
}
# Packages pending approval ----------------------------------------------
my @packages = ();
if (opendir D, $self->config->get_key('upload_queue:path')) {
@packages = grep /\.changes$/, readdir D;
closedir D;
}
my (@readable_packages, @unreadable_packages, %source_package_info);
my $gpg_dir = $self->config->get_key('web_ui:gpg_homedir');
my $repository = Arepa::Repository->new($self->config_path);
foreach my $package (@packages) {
my $package_path =
$self->config->get_key('upload_queue:path')."/".$package;
my $obj = undef;
eval {
$obj = Parse::Debian::PackageDesc->new($package_path,
gpg_homedir => $gpg_dir);
};
if ($obj) {
push @readable_packages, $obj;
# Fetch some extra information from already existing packages
my $pkg = $obj->source;
lib/Arepa/Web/Incoming.pm view on Meta::CPAN
use File::Basename;
use Parse::Debian::PackageDesc;
use Arepa::Repository;
use Arepa::BuilderFarm;
sub _approve_package {
my ($self, $changes_file_path, %opts) = @_;
# Only get the file basename, and search for it in the incoming directory
my $path = $self->config->get_key('upload_queue:path') . "/" .
basename($changes_file_path);
my $changes_file = Parse::Debian::PackageDesc->new($path);
my $distribution = $changes_file->distribution;
# Add the source package to the repo
my ($source_file_path) = grep /\.dsc$/, $changes_file->files;
my $repository = Arepa::Repository->new($self->config_path);
my $farm = Arepa::BuilderFarm->new($self->config_path);
my ($arch) = grep { $_ ne 'source' } $changes_file->architecture;
lib/Arepa/Web/Incoming.pm view on Meta::CPAN
$distribution);
};
if ($@) {
$self->_add_error($@);
return 0;
}
my $source_pkg_id;
if ($canonical_distro) {
$source_pkg_id = $repository->insert_source_package(
$self->config->get_key('upload_queue:path').
"/".$source_file_path,
$distribution,
canonical_distro => $canonical_distro,
%opts);
if ($source_pkg_id) {
if (! $self->config->key_exists('repository:signature:id') ||
$self->config->get_key('repository:signature:id') ne
'unsigned') {
my $sign_cmd = "sudo -H -u arepa-master arepa sign >/dev/null";
lib/Arepa/Web/Incoming.pm view on Meta::CPAN
}
if ($self->_error_list) {
return 0;
}
else {
# If everything went fine, add the source package to the compilation
# queue
$farm->request_package_compilation($source_pkg_id);
$self->_remove_uploaded_package($path);
if ($self->_error_list) {
return 0;
}
}
return 1;
}
sub _remove_uploaded_package {
my ($self, $changes_file_path) = @_;
my $changes_file = Parse::Debian::PackageDesc->new($changes_file_path);
# Remove all files from the pending queue
# Files referenced by the changes file
foreach my $file ($changes_file->files) {
my $file_path = $self->config->get_key('upload_queue:path')."/".$file;
if (-e $file_path && ! unlink($file_path)) {
$self->add_error("Can't delete '$file_path'.");
}
}
# Changes file itself
if (! unlink($changes_file_path)) {
$self->add_error("Can't delete '$changes_file_path'.");
}
}
lib/Arepa/Web/Incoming.pm view on Meta::CPAN
if ($self->param("approve_all") ||
$self->param("approve-$field_id")) {
$self->_approve_package(
$self->param("package-$field_id"),
priority => $self->param("priority-$field_id"),
section => $self->param("section-$field_id"),
comments => $self->param("comments-$field_id"));
}
elsif ($self->param("reject-$field_id")) {
my $changes_file_path = $self->param("package-$field_id");
my $path = $self->config->get_key('upload_queue:path')."/".
basename($changes_file_path);
$self->_remove_uploaded_package($path);
}
}
if ($self->_error_list) {
$self->vars(errors => [$self->_error_list]);
$self->render('error');
}
else {
$self->redirect_to('home');
}
});
lib/Arepa/Web/Public.pm view on Meta::CPAN
$value =~ s/</</g;
$value =~ s/>/>/g;
return $value;
}
sub rss_queue {
my ($self) = @_;
my $rss = XML::RSS->new(version => '2.0');
$rss->channel(
title => "Arepa upload queue",
link => "http://search.cpan.org/~opera/",
description => "Packages waiting to be approved for your Debian repository",
dc => {
date => '2010-06-02T09:15+00:00',
subject => "Software distribution",
creator => 'estebanm@opera.com',
language => 'en-us',
},
syn => {
updatePeriod => "hourly",
updateBase => "1901-01-01T00:00+00:00",
},
taxo => [
'http://dmoz.org/Computers/Software/Operating_Systems/Linux/Distributions/Debian/',
]
);
my @changes_files = ();
if (opendir D, $self->config->get_key('upload_queue:path')) {
@changes_files = grep /\.changes$/, readdir D;
closedir D;
}
my @packages;
my $gpg_dir = $self->config->get_key('web_ui:gpg_homedir');
foreach my $changes_file (@changes_files) {
my $changes_file_path = $self->config->get_key('upload_queue:path') .
"/" . $changes_file;
eval {
push @packages,
Parse::Debian::PackageDesc->new($changes_file_path,
gpg_homedir => $gpg_dir);
};
if ($EVAL_ERROR) {
print STDERR "Error reading changes file '$changes_file_path'\n";
print STDERR $EVAL_ERROR, "\n";
}
lib/Arepa/Web/Public.pm view on Meta::CPAN
}
else {
$signature_info = "It is <strong>NOT SIGNED</strong>.";
}
$rss->add_item(
title => $pkg->name . " " . $pkg->version . " for " .
$pkg->distribution,
link => $public_url,
description => $pkg->name . " " . $pkg->version .
" was uploaded by " .
$self->_retarded_escape($pkg->maintainer) .
".<br/>" . $signature_info,
pubDate => strftime("%a, %d %b %Y %H:%M:%S %z",
localtime(stat($pkg->path)->mtime)),
);
}
$self->render_text($rss->as_string);
}
t/003-config.t view on Meta::CPAN
use Test::More tests => 9;
use Test::Deep;
use Arepa::Config;
use constant TEST_CONFIG_FILE => 't/config-test.yml';
my $c = Arepa::Config->new(TEST_CONFIG_FILE);
is($c->get_key('package_db'),
"t/test-package.db",
"Simple configuration keys should work");
is($c->get_key('upload_queue:path'),
'/home/zoso/src/apt-web/incoming',
"Nested configuration key should work");
unlink $c->get_key('package_db');
cmp_deeply([ $c->get_builders ],
bag(qw(lenny64 lenny32 etch64 etch32)),
"Builder information should be correct");
my $expected_builder_info = {
name => 'lenny64',
t/004-repository.t view on Meta::CPAN
my $test_db_path = 't/test-package.db';
foreach my $subdir (qw(db dists pool)) {
rmtree "$test_repo_path/$subdir";
}
unlink $test_db_path;
my $r = Arepa::Repository->new(TEST_CONFIG_FILE);
is($r->get_config_key('package_db'),
"t/test-package.db",
"Simple configuration keys should work");
is($r->get_config_key('upload_queue:path'),
'/home/zoso/src/apt-web/incoming',
"Nested configuration key should work");
ok($r->config_key_exists('package_db'),
"Existing config keys should be recognised");
ok(!$r->config_key_exists('i_dont_exist'),
"Non-existing config keys should NOT be recognised");
my $expected_distributions = [{ codename => 'lenny-opera',
components => 'main',
t/004-repository.t view on Meta::CPAN
origin => 'Opera'}];
cmp_deeply([ $r->get_distributions ],
$expected_distributions,
"Distribution information should be correct");
cmp_deeply([ $r->get_architectures ],
[ qw(source i386 amd64) ],
"The architectures should be complete and not duplicated");
# Insert a new source package into the repository ----------------------------
ok($r->insert_source_package('t/upload_queue/dhelp_0.6.15.dsc', 'lenny-opera'),
"Inserting a new source package should succeed");
ok($r->{package_db}->get_source_package_id('dhelp', '0.6.15'),
"After inserting the source package, it should be in the package db");
my %dhelp_0615_props = $r->get_source_package_information('dhelp',
'lenny-opera');
ok(scalar %dhelp_0615_props,
"Source package dhelp should be in the repository");
is($dhelp_0615_props{version}, '0.6.15',
"Source package dhelp should be in the repository w/ correct version");
# Insert a new binary package into the repository ----------------------------
ok($r->insert_binary_package('t/upload_queue/dhelp_0.6.15_all.deb',
'lenny-opera'),
"Inserting a new binary package should succeed");
my %dhelp_0615_bin_props = $r->get_binary_package_information('dhelp',
'lenny-opera',
'i386');
ok(scalar %dhelp_0615_bin_props,
"Binary package dhelp should be in the repository");
is($dhelp_0615_bin_props{version}, '0.6.15',
"Binary package dhelp should be in the repository w/ correct version");
# Insert a new source package into the repository, with comments -------------
my $comments = "Now with comments";
ok($r->insert_source_package('t/upload_queue/foobar_1.0-1.dsc', 'lenny-opera',
comments => $comments),
"Inserting a new source package (w/ comments) should succeed");
my $id_w_comments = $r->{package_db}->get_source_package_id('foobar', '1.0-1');
ok($id_w_comments,
"After inserting the source package, it should be in the package db");
my %source_pkg_w_comments =
$r->{package_db}->get_source_package_by_id($id_w_comments);
is($source_pkg_w_comments{comments}, $comments,
"The source package should keep its comments, if any");
t/004-repository.t view on Meta::CPAN
{
foobar => { "lenny-opera/main" => { "1.0-1" => ['source'] } },
dhelp => { "lenny-opera/main" => { "0.6.15" => set(qw(i386
amd64
source)),
} },
},
"The final package list should be correct");
# Insert mixed versions of a new package
$r->insert_source_package('t/upload_queue/qux_1.0-1.dsc', 'lenny-opera');
$r->insert_binary_package('t/upload_queue/qux_1.0-1_i386.deb', 'lenny-opera');
$r->insert_binary_package('t/upload_queue/qux_1.0-1_amd64.deb', 'lenny-opera');
$r->insert_binary_package('t/upload_queue/qux_1.0-2_i386.deb', 'lenny-opera');
# Now check the package list
cmp_deeply({ $r->get_package_list },
{
foobar => { "lenny-opera/main" => { "1.0-1" => ['source'] } },
qux => { "lenny-opera/main" => { "1.0-1" => set(qw(amd64
source)),
"1.0-2" => ['i386'],
} },
dhelp => { "lenny-opera/main" => { "0.6.15" => set(qw(i386
amd64
source)),
} },
},
"The final package list should be correct");
# Insert a source package with non-canonical distribution --------------------
ok(! $r->insert_source_package('t/upload_queue/experimental-package_1.0.dsc',
'experimental'),
"Inserting source package w/ non-canonical distro should fail");
ok($r->insert_source_package('t/upload_queue/experimental-package_1.0.dsc',
'experimental',
canonical_distro => 'lenny-opera'),
"Inserting non-canonical distro source package w/ canonical distro hint");
# Ugly way of checking that the source package is correctly inserted
my $id = $r->{package_db}->get_source_package_id('experimental-package',
'1.0');
my %source_package_attrs = $r->{package_db}->get_source_package_by_id($id);
is($source_package_attrs{distribution}, 'experimental',
"When inserting a non-canonical distro package, the distro is correct");
t/004-repository.t view on Meta::CPAN
"Distribution information should be correct");
# Check that after adding a distribution, the repository is updated
ok(-d "$tmp_repo/dists/new",
"After adding distribution 'new', '$tmp_repo/dists/new' should exist");
rmtree($tmp_repo);
# Insert a source package with more than one architecture --------------------
ok($r->insert_source_package('t/upload_queue/multiarch_1.0-1.dsc',
'lenny-opera'),
"Inserting a multiarch source package should succeed");
ok($r->{package_db}->get_source_package_id('multiarch', '1.0-1'),
"After inserting the multiarch package, it should be in the package db");
my %multiarch_props = $r->get_source_package_information('multiarch',
'lenny-opera');
ok(scalar %multiarch_props,
"Source package w/ multiple architectures should be present");
ok($r->insert_source_package('t/upload_queue/multiarch2_1.0-1.dsc',
'lenny-opera'),
"Inserting a multiarch source package should succeed (2)");
ok($r->{package_db}->get_source_package_id('multiarch2', '1.0-1'),
"After inserting the multiarch package, it should be in the package db (2)");
my %multiarch2_props = $r->get_source_package_information('multiarch2',
'lenny-opera');
ok(scalar %multiarch2_props,
"Source package w/ multiple architectures should be present (2)");
t/Test/Arepa.pm view on Meta::CPAN
unlink $session_db_path;
my $dbh = DBI->connect("dbi:SQLite:$session_db_path","","");
my $sth =
$dbh->prepare("CREATE TABLE session (sid VARCHAR(40) PRIMARY KEY, " .
"data TEXT, " .
"expires INTEGER UNSIGNED " .
"NOT NULL, " .
"UNIQUE(sid));");
$sth->execute;
# Make sure the upload queue exists
mkpath($self->{config}->get_key('upload_queue:path'));
# Make sure the repository itself exists. If we had to create it, copy the
# conf/distributions configuration file
my $repo_path = $self->{config}->get_key('repository:path');
my $number_dirs_created = mkpath(File::Spec->catfile($repo_path, "conf"));
if ($number_dirs_created) {
my $conf_base_dir = dirname($self->{config_path});
copy(File::Spec->catfile($conf_base_dir, "distributions"),
File::Spec->catfile($repo_path, "conf"));
}
t/Test/Arepa.pm view on Meta::CPAN
my @r = ();
for (my $i = 0; $i <= $#pkg_names; ++$i) {
push @r, $pkg_names[$i] . "_" . $pkg_versions[$i];
}
return @r;
}
sub queue_files {
my ($self, @files) = @_;
my $upload_queue_path = $self->config->get_key('upload_queue:path');
foreach my $file (@files) {
copy($file, $upload_queue_path);
}
}
sub save_snapshot {
my ($self) = @_;
open F, ">/tmp/mojo-arepa-snapshot.html";
print F $self->t->tx->res->body;
close F;
}
t/Test/Arepa/T01Smoke.pm view on Meta::CPAN
my $self = shift;
$self->t->content_like(qr/test-builder/);
}
sub test_incoming_package_list : Test(3) {
my $self = shift;
is($self->incoming_packages, 0,
"There should not be any incoming packages to start with");
# Copy one package to the upload queue, see what happens
$self->queue_files(glob('t/webui/fixtures/foobar_1.0*'));
$self->t->get_ok('/');
is_deeply([ $self->incoming_packages ], [qw(foobar_1.0-1)],
"Package 'foobar' should be in the upload queue");
}
sub test_approve_package : Test(3) {
my $self = shift;
$self->queue_files(glob("t/webui/fixtures/foobar_1.0*"));
is($self->incoming_packages, 1,
"There should be one incoming package in the queue after upload");
my ($component, $priority, $section, $comments) =
("main", "optional", "misc", "Some comment for foobar_1.0-1");
$self->t->post_form_ok("/incoming/process" =>
{ "package-1" => "foobar_1.0-1_i386.changes",
"component-1" => $component,
"priority-1" => $priority,
"section-1" => $section,
"comments-1" => $comments,
"approve-1" => "Approve",
});
t/config-canonical-distros-test.yml view on Meta::CPAN
---
# Where the repo is
repository:
path: t/repo-test
# Where the upload queue is (some anonymous FTP upload directory, or
# SSH-accesible queue or whatever)
upload_queue:
path: /home/zoso/src/apt-web/incoming
# SQLite package database with states ('pending', 'compiling', 'compiled',
# 'compilationfailed'), architecture ('source', 'all', 'amd64', etc.),
# timestamps, etc.
package_db: t/compilation-targets-package.db
web_ui:
template_dir: /home/zoso/src/apt-web/repo-tools-web/templates/
dir:
build_logs: t/tmp
t/config-compilation-targets-test.yml view on Meta::CPAN
---
# Where the repo is
repository:
path: t/repo-test
# Where the upload queue is (some anonymous FTP upload directory, or
# SSH-accesible queue or whatever)
upload_queue:
path: /home/zoso/src/apt-web/incoming
# SQLite package database with states ('pending', 'compiling', 'compiled',
# 'compilationfailed'), architecture ('source', 'all', 'amd64', etc.),
# timestamps, etc.
package_db: t/compilation-targets-package.db
web_ui:
template_dir: /home/zoso/src/apt-web/repo-tools-web/templates/
dir:
build_logs: t/tmp
t/config-repo-test.yml view on Meta::CPAN
---
# Where the repo is
repository:
path: t/repo-add-test
# Where the upload queue is (some anonymous FTP upload directory, or
# SSH-accesible queue or whatever)
upload_queue:
path: /home/zoso/src/apt-web/incoming
# SQLite package database with states ('pending', 'compiling', 'compiled',
# 'compilationfailed'), architecture ('source', 'all', 'amd64', etc.),
# timestamps, etc.
package_db: t/test-repo-package.db
web_ui:
template_dir: /home/zoso/src/apt-web/repo-tools-web/templates/
dir:
build_logs: t/tmp
t/config-test.yml view on Meta::CPAN
---
# Where the repo is
repository:
path: t/repo-test
# Where the upload queue is (some anonymous FTP upload directory, or
# SSH-accesible queue or whatever)
upload_queue:
path: /home/zoso/src/apt-web/incoming
# SQLite package database with states ('pending', 'compiling', 'compiled',
# 'compilationfailed'), architecture ('source', 'all', 'amd64', etc.),
# timestamps, etc.
package_db: t/test-package.db
web_ui:
template_dir: /home/zoso/src/apt-web/repo-tools-web/templates/
dir:
build_logs: t/tmp
t/upload_queue/experimental-package_1.0_i386.build view on Meta::CPAN
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `experimental-package' in `../experimental-package_1.0_i386.deb'.
dpkg-genchanges >../experimental-package_1.0_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now signing changes and any dsc files...
signfile experimental-package_1.0.dsc Esteban Manchado Velázquez <estebanm@estebanm-desktop>
gpg: skipped "Esteban Manchado Velázquez <estebanm@estebanm-desktop>": secret key not available
gpg: /tmp/debsign.mML97X6p/experimental-package_1.0.dsc: clearsign failed: secret key not available
debsign: gpg error occurred! Aborting....
t/upload_queue/qux_1.0-1_i386.build view on Meta::CPAN
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `qux' in `../qux_1.0-1_i386.deb'.
dpkg-genchanges >../qux_1.0-1_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now signing changes and any dsc files...
signfile qux_1.0-1.dsc Esteban Manchado Velázquez <estebanm@estebanm-desktop>
gpg: skipped "Esteban Manchado Velázquez <estebanm@estebanm-desktop>": secret key not available
gpg: /tmp/debsign.MlxdxnoC/qux_1.0-1.dsc: clearsign failed: secret key not available
debsign: gpg error occurred! Aborting....
t/webui/conf/default/config.yml view on Meta::CPAN
---
repository:
path: t/webui/tmp/repository/
# remote_path: machine:/var/www/virtual/aptrepo/html/debian/
signature: unsigned # Special value meaning the repo shouldn't be signed
# id: 12345678
upload_queue:
path: t/webui/tmp/upload-queue
package_db: t/webui/tmp/package.db
web_ui:
public_url: http://localhost/cgi-bin/arepa/arepa.cgi
base_url: /
template_dir: /usr/share/arepa/templates
user_file: t/webui/conf/users.yml
gpg_homedir: ./t/webui/conf/gnupg-web
check_remote_repo: 1
session_db: t/webui/tmp/sessions.db
dir:
t/webui/fixtures/foobar_1.0-1_i386.build view on Meta::CPAN
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `foobar' in `../foobar_1.0-1_all.deb'.
dpkg-genchanges >../foobar_1.0-1_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now signing changes and any dsc files...
signfile foobar_1.0-1.dsc Esteban Manchado Velázquez <estebanm@estebanm-desktop>
gpg: skipped "Esteban Manchado Velázquez <estebanm@estebanm-desktop>": secret key not available
gpg: /tmp/debsign.ajpMJIPU/foobar_1.0-1.dsc: clearsign failed: secret key not available
debsign: gpg error occurred! Aborting....
t/webui/fixtures/foobar_2.0-1_i386.build view on Meta::CPAN
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `foobar' in `../foobar_2.0-1_all.deb'.
dpkg-genchanges >../foobar_2.0-1_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now signing changes and any dsc files...
signfile foobar_2.0-1.dsc Esteban Manchado Velázquez <estebanm@estebanm-desktop>
gpg: skipped "Esteban Manchado Velázquez <estebanm@estebanm-desktop>": secret key not available
gpg: /tmp/debsign.JQslFHJP/foobar_2.0-1.dsc: clearsign failed: secret key not available
debsign: gpg error occurred! Aborting....
templates/dashboard/index.html.ep view on Meta::CPAN
</span>
</div>
<% } %>
</div>
</div>
<div id="main">
<h1>Packages pending approval</h1>
<% if (scalar(@$packages) == 0) { %>
No packages pending in <tt><%= $config->get_key('upload_queue:path') %></tt>
<% }
else { %>
<div id="incoming-package-list">
<% my $package_count = 0; %>
<form method="post" action="<%= url_for('generic', controller => 'incoming', action => 'process') %>">
<% foreach my $package (@$packages) { %>
<% $package_count += 1; %>
<div class="incoming-package">
<span class="incoming-package-name urgency-<%= $package->urgency %>"><%= $package->name %></span>
<span class="incoming-package-version"><%= $package->version %></span>
templates/keys/index.html.ep view on Meta::CPAN
<pre>
<%= $output %>
</pre>
<h1>Import new uploader GPG keys</h1>
<% if ($is_user_admin) { %>
<form method="post" action="<%= url_for('generic', controller => 'keys', action => 'import') %>">
<textarea name="gpgkeys" cols="80" rows="20"></textarea>
<br/>
<input type="submit" value="Import" />
</form>
<% }
else { %>
You don't have permissions to import keys yourself. Talk to an administrator
to get you key imported.