├── .github └── workflows │ ├── README.md │ └── perl-tests.yml ├── .gitignore ├── .mailmap ├── .travis.yml ├── Makefile.PL ├── app_2017.psgi ├── bin ├── emailaddrs_for_cpan_org.pl ├── from-mods-to-primeur.pl └── paused ├── bootstrap ├── .gitignore ├── README.md ├── import-pause-data ├── lib │ └── Dobby │ │ └── Client.pm ├── mkpause ├── selfconfig-pause ├── selfconfig-root └── test-key.txt ├── corpus ├── Provides-NoFile-0.50.tar.gz ├── case-fakes │ ├── Foo-Bar-001.yaml │ └── Foo-Bar-002.yaml ├── empty.txt.gz └── mld │ ├── 001 │ └── authors │ │ ├── A │ │ └── AA │ │ │ └── AAARGH │ │ │ └── Mooooooose-0.01.tar.gz │ │ ├── O │ │ ├── OO │ │ │ └── OOOPPP │ │ │ │ └── Jenkins-Hack-0.11.tar.gz │ │ └── OP │ │ │ └── OPRIME │ │ │ ├── Bug-Gold-9.001.tar.gz │ │ │ ├── CHECKSUMS │ │ │ └── XForm-Rollout-1.00.tar.gz │ │ └── X │ │ └── XY │ │ └── XYZZY │ │ ├── CHECKSUMS │ │ ├── Hall-MtKing-0.01.tar.gz │ │ └── Y-2.tar.gz │ ├── dot-pm │ └── authors │ │ └── O │ │ └── OP │ │ └── OPRIME │ │ └── Matrix.pm.gz │ ├── perl6 │ └── authors │ │ └── F │ │ └── FR │ │ └── FROGGS │ │ └── Perl6 │ │ └── Inline-1.1.tar.gz │ ├── submodule-comaint │ ├── README.txt │ └── authors │ │ └── O │ │ └── OO │ │ └── OOOPPP │ │ └── Jenkins-Hack-0.14.tar.gz │ ├── submodule-comaint2 │ ├── README.txt │ └── authors │ │ └── O │ │ └── OO │ │ └── OOOPPP │ │ └── Jenkins-Hack-0.15.tar.gz │ └── submodule-firstcome │ ├── README.txt │ └── authors │ └── N │ └── NE │ └── NEILB │ └── Acme-Playpen-2.00.tar.gz ├── cpanfile ├── cron ├── CRONTAB.ROOT ├── cleanup-incoming.pl ├── cron-daily.pl ├── cron-p6daily.pl ├── gmls-lR.pl ├── mldistwatch ├── mysql-dump.pl ├── recentfile-aggregate ├── rm_stale_links ├── sync-04pause.pl └── update-checksums.pl ├── doc ├── README.md ├── authen_pause.schema.txt ├── install-prod.md ├── installing-pause.md ├── mod.schema.txt ├── operating-model.md ├── privacy-policy.md ├── quick-tour.md └── schemas │ ├── README │ ├── authen_pause.schema.sqlite │ └── mod.schema.sqlite ├── etc ├── aliases ├── init.d │ ├── PAUSE-paused │ ├── PAUSE-perlbal │ ├── PAUSE-rsyncd │ └── PAUSE-rsyncd2 ├── logrotate.d │ ├── csync2 │ ├── mldistwatch │ └── rsyncd ├── mon │ ├── mon.cf │ └── mon.d │ │ ├── 3ware_cli.monitor │ │ ├── README │ │ ├── paused.monitor │ │ ├── rersyncrecent.monitor │ │ ├── rsyncd.monitor │ │ └── rsyncd2.monitor ├── motd ├── my.cnf ├── plack_log.conf.development ├── plack_log.conf.ghaction ├── plack_log.conf.production ├── plack_log.conf.travis ├── postfix │ └── main.cf-pause-us ├── rsyncd.conf └── security │ └── limits.conf ├── htdocs ├── .well-known │ └── acme-challenge │ │ └── README ├── 00modlist.long.html ├── 04pause.html ├── _apaxy │ ├── icons │ │ ├── archive.png │ │ ├── audio.png │ │ ├── authors.png │ │ ├── bin.png │ │ ├── blank.png │ │ ├── bmp.png │ │ ├── c.png │ │ ├── calc.png │ │ ├── cd.png │ │ ├── copying.png │ │ ├── cpp.png │ │ ├── css.png │ │ ├── deb.png │ │ ├── default.png │ │ ├── diff.png │ │ ├── doc.png │ │ ├── draw.png │ │ ├── eps.png │ │ ├── exe.png │ │ ├── folder-home.png │ │ ├── folder-open.png │ │ ├── folder-page.png │ │ ├── folder-parent-old.png │ │ ├── folder-parent.png │ │ ├── folder.png │ │ ├── gif.png │ │ ├── gzip.png │ │ ├── h.png │ │ ├── hpp.png │ │ ├── html.png │ │ ├── ico.png │ │ ├── image.png │ │ ├── install.png │ │ ├── java.png │ │ ├── jpg.png │ │ ├── js.png │ │ ├── json.png │ │ ├── log.png │ │ ├── makefile.png │ │ ├── markdown.png │ │ ├── package.png │ │ ├── pdf.png │ │ ├── perl.png │ │ ├── php.png │ │ ├── playlist.png │ │ ├── png.png │ │ ├── pres.png │ │ ├── ps.png │ │ ├── psd.png │ │ ├── py.png │ │ ├── rar.png │ │ ├── rb.png │ │ ├── readme.png │ │ ├── rpm.png │ │ ├── rss.png │ │ ├── rtf.png │ │ ├── script.png │ │ ├── source.png │ │ ├── sql.png │ │ ├── tar.png │ │ ├── tex.png │ │ ├── text.png │ │ ├── tiff.png │ │ ├── unknown.png │ │ ├── vcal.png │ │ ├── video.png │ │ ├── xml.png │ │ └── zip.png │ └── style.css ├── admin.html ├── history.html ├── imprint.html ├── index.html ├── logout.html ├── namingmodules.html ├── namingmodules.pod ├── password.html ├── pause │ ├── hw-pause-2006-small.jpg │ ├── hw-pause-2006.jpg │ ├── list.min.js │ ├── logo9-sm.gif │ ├── logo9-sm.png │ ├── logo9a-sm.jpg │ ├── logo9a-sm.png │ ├── logol1.gif │ ├── logol1.png │ ├── min.css │ ├── pause.css │ ├── pause2.jpg │ ├── pause2.png │ ├── pause_2017.css │ ├── pause_favicon.jpg │ ├── valid-xhtml10.gif │ ├── valid-xhtml10.png │ ├── vcss.gif │ └── vcss.png ├── robots.txt └── ssl-only │ └── hello.txt ├── lib ├── Bundle │ └── Pause.pm ├── PAUSE.pm ├── PAUSE.pod ├── PAUSE │ ├── Crypt.pm │ ├── Logger.pm │ ├── MailAddress.pm │ ├── PermsManager.pm │ ├── dist.pm │ ├── mldistwatch.pm │ ├── mldistwatch │ │ └── Constants.pm │ ├── package.pm │ └── pmfile.pm └── pause_2017 │ ├── PAUSE │ ├── Web.pm │ └── Web │ │ ├── App │ │ ├── Disabled.pm │ │ └── Index.pm │ │ ├── Config.pm │ │ ├── Context.pm │ │ ├── Controller │ │ ├── Admin.pm │ │ ├── Admin │ │ │ ├── ManageId.pm │ │ │ └── User.pm │ │ ├── Mlrepr.pm │ │ ├── Public.pm │ │ ├── Public │ │ │ └── RequestId.pm │ │ ├── Root.pm │ │ ├── User.pm │ │ └── User │ │ │ ├── Cred.pm │ │ │ ├── Distperms.pm │ │ │ ├── Files.pm │ │ │ ├── Perms.pm │ │ │ └── Uri.pm │ │ ├── Exception.pm │ │ ├── Middleware │ │ └── Auth │ │ │ └── Basic.pm │ │ ├── Plugin │ │ ├── ConfigPerRequest.pm │ │ ├── Delegate.pm │ │ ├── EditUtils.pm │ │ ├── FixAction.pm │ │ ├── GetActiveUserRecord.pm │ │ ├── GetUserMeta.pm │ │ ├── IsPauseClosed.pm │ │ ├── MyURL.pm │ │ ├── RenderYAML.pm │ │ ├── ServePauseDoc.pm │ │ ├── SessionCounted.pm │ │ ├── TextFormat.pm │ │ ├── UserRegistration.pm │ │ └── WrapAction.pm │ │ └── Util │ │ ├── Encode.pm │ │ └── RewriteXHTML.pm │ ├── TODO │ └── templates │ ├── _closed.html.ep │ ├── _debug.html.ep │ ├── _user_menu.html.ep │ ├── _user_status.html.ep │ ├── admin │ ├── change_user_status.html.ep │ ├── edit_ml.html.ep │ ├── email_for_admin.html.ep │ ├── manage_id │ │ └── manage.html.ep │ ├── select_user.html.ep │ └── user │ │ └── add.html.ep │ ├── closed.html.ep │ ├── disabled.html.ep │ ├── email │ ├── admin │ │ ├── change_user_status.email.ep │ │ ├── edit_ml.email.ep │ │ └── user │ │ │ ├── onetime_password.email.ep │ │ │ ├── welcome_ml.email.ep │ │ │ └── welcome_user.email.ep │ ├── public │ │ ├── mailpw.email.ep │ │ └── request_id.email.ep │ └── user │ │ ├── change_passwd.email.ep │ │ ├── cred │ │ └── edit.email.ep │ │ ├── delete_files.email.ep │ │ ├── edit_uris.email.ep │ │ ├── reindex.email.ep │ │ ├── reset_version.email.ep │ │ └── uri │ │ └── submission.email.ep │ ├── layouts │ └── layout.html.ep │ ├── mlrepr │ ├── select_ml_action.html.ep │ └── show_ml_repr.html.ep │ ├── pause_doc.html.ep │ ├── public │ ├── admin.html.ep │ ├── mailpw.html.ep │ ├── pumpkin.html.ep │ └── request_id │ │ ├── _form.html.ep │ │ └── request.html.ep │ ├── root │ └── index.html.ep │ └── user │ ├── change_passwd.html.ep │ ├── cred │ └── edit.html.ep │ ├── distperms │ ├── giveup_dist_comaint.html.ep │ ├── make_dist_comaint.html.ep │ ├── move_dist_primary.html.ep │ ├── peek.html.ep │ ├── remove_dist_comaint.html.ep │ └── remove_dist_primary.html.ep │ ├── edit_uris.html.ep │ ├── files │ ├── delete.html.ep │ └── show.html.ep │ ├── perms │ ├── _share_makeco.html.ep │ ├── _share_movepr.html.ep │ ├── _share_remocos.html.ep │ ├── _share_remome.html.ep │ ├── _share_remopr.html.ep │ ├── giveup_comaint.html.ep │ ├── make_comaint.html.ep │ ├── move_primary.html.ep │ ├── peek.html.ep │ ├── remove_comaint.html.ep │ ├── remove_primary.html.ep │ └── share.html.ep │ ├── reindex.html.ep │ ├── reset_version.html.ep │ ├── show_ml_repr.html.ep │ ├── tail_logfile.html.ep │ └── uri │ ├── _continued.html.ep │ └── add.html.ep ├── one-off-utils ├── README ├── build-fresh-cpan ├── converting-m-to-f-20160312.pl ├── converting-m-to-f-20160403.pl ├── converting-m-to-f-20160408.pl ├── converting-m-to-f-20160416.pl ├── converting-m-to-f-20160424.pl ├── count-yaml-generated-by.pl ├── count-yaml-provides-empty.pl ├── count-yaml-requires.pl ├── count-yaml-with-provides.pl ├── dagolden-ambiguity.pl ├── diff-02packages.pl ├── distnameinfo-generated-distros.pl ├── fill_distname.pl ├── fill_users_with_ustatus.pl ├── schemachange-2005-03-14.sql ├── schemachange-2019-04-25.sql ├── schemachange-2024-04.sql ├── sharpen-distmtimes-fromdata.pl ├── sharpen-distmtimes.pl ├── show-stale-registered-modulenames.pl └── tsee-2007-namespace-dele.pl ├── privatelib └── .gitignore ├── services ├── pause-web.service └── paused.service └── t ├── 70_critic.t ├── RECENT-2d.yaml ├── crypt.t ├── data └── files │ └── somefile.txt ├── dist └── My-Dist.yaml ├── isa-perl.t ├── lib ├── Email │ └── Sender │ │ └── Transport │ │ └── KeepDeliveries.pm ├── Mock │ └── Dist.pm ├── PAUSE │ ├── TestPAUSE.pm │ └── TestPAUSE │ │ └── Result.pm └── TestSetup.pm ├── losing-first-come.t ├── mldistwatch-big.t ├── mldistwatch-class.t ├── mldistwatch-db.t ├── mldistwatch-misc.t ├── mldistwatch-perl.t ├── pause.t ├── pause_2017 ├── 00_load.t ├── action │ ├── add_uri.t │ ├── add_user.t │ ├── change_passwd.t │ ├── change_user_status.t │ ├── delete_files.t │ ├── edit_cred.t │ ├── edit_ml.t │ ├── edit_uris.t │ ├── email_for_admin.t │ ├── giveup_comaint.t │ ├── giveup_dist_comaint.t │ ├── mailpw.t │ ├── make_comaint.t │ ├── make_dist_comaint.t │ ├── manage_id_requests.t │ ├── move_dist_primary.t │ ├── move_primary.t │ ├── pause_04about.t │ ├── pause_04imprint.t │ ├── pause_05news.t │ ├── pause_06history.t │ ├── pause_logout.t │ ├── pause_namingmodules.t │ ├── pause_operating_model.t │ ├── pause_privacy_policy.t │ ├── peek_dist_perms.t │ ├── peek_perms.t │ ├── reindex.t │ ├── remove_comaint.t │ ├── remove_dist_comaint.t │ ├── remove_dist_primary.t │ ├── remove_primary.t │ ├── request_id.t │ ├── reset_version.t │ ├── select_ml_action.t │ ├── select_user.t │ ├── share_perms.t │ ├── show_files.t │ ├── show_ml_repr.t │ ├── tail_logfile.t │ ├── who_admin.t │ └── who_pumpkin.t ├── auth.t ├── lib │ └── Test │ │ └── PAUSE │ │ ├── MySQL.pm │ │ └── Web.pm └── logout.t ├── perlcriticrc ├── privatelib └── PrivatePAUSE.pm ├── programs.t ├── propagating-permissions.t ├── recent.t ├── staging ├── Hash-RenameKey-0.02.tar.gz ├── Hash-RenameKey-notgzformat-0.02.tar.gz ├── Hash-RenameKey-trailinggarbage-0.02.tar.gz └── Hash-RenameKey-worldwriteable-0.02.tar.gz ├── submodule-comaint.t └── submodule-firstcome.t /.github/workflows/README.md: -------------------------------------------------------------------------------- 1 | # GitHub Actions Workflows 2 | 3 | This directory contains workflow definitions for GitHub actions. 4 | 5 | ## Local Testing 6 | 7 | The easiest way to end to end test them is wih a tool such as 8 | https://github.com/nektos/act (https://nektosact.com/). 9 | 10 | ``` 11 | $ act --artifact-server-path=/tmp/artifacts 12 | ... actions run here! ... 13 | ``` 14 | 15 | You can use the `--reuse` flag to reuse information between runs, 16 | which can speed things up. `--action-offline-mode` and `--pull=false` 17 | can be used to test local copies of container images instead. 18 | 19 | IMPORTANT: You need a version of act from 2024-05-20 or later. 20 | (e.g. newer than v0.2.62) to support `actions/upload-artifact@v4`. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | MYMETA.* 2 | Makefile 3 | blib/ 4 | pm_to_blib 5 | .*.swp 6 | mailer.testfile 7 | privatelib 8 | cover_db 9 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Andreas König 2 | Andreas König 3 | Andreas König 4 | Andreas König 5 | Andreas König 6 | Andreas König 7 | David Golden 8 | Kenichi Ishigaki 9 | Ricardo Signes 10 | Ricardo Signes 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | language: perl 3 | perl: 4 | - "5.16" 5 | 6 | sudo: required 7 | 8 | env: 9 | - PLACK_ENV=travis 10 | 11 | before_install: 12 | - sudo apt-get -qq update 13 | - sudo apt-get install -y libdb-dev 14 | ## Set a git identity 15 | - git config --global user.email "travis@example.com" 16 | - git config --global user.name "Travis PAUSE" 17 | - sudo cp /etc/mysql/my.cnf /usr/share/mysql/my-default.cnf 18 | -------------------------------------------------------------------------------- /app_2017.psgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | use warnings; 5 | use FindBin; 6 | use lib "$FindBin::Bin/lib/", "$FindBin::Bin/lib/pause_2017", "$FindBin::Bin/../pause-private/lib", "$FindBin::Bin/privatelib"; 7 | use Plack::Builder; 8 | use Plack::App::Directory::Apaxy; 9 | use Path::Tiny; 10 | my $AppRoot = path(__FILE__)->parent->realpath; 11 | Log::Dispatch::Config->configure("$AppRoot/etc/plack_log.conf.".($ENV{PLACK_ENV} // 'development')); 12 | 13 | $ENV{MOJO_REVERSE_PROXY} = 1; 14 | $ENV{MOJO_HOME} = $AppRoot; 15 | 16 | # preload stuff 17 | use PAUSE::Web::Context; 18 | use PAUSE::Web; 19 | use PAUSE::Web::App::Index; 20 | use PAUSE::Web::App::Disabled; 21 | 22 | use BSD::Resource (); 23 | #BSD::Resource::setrlimit(BSD::Resource::RLIMIT_CPU(), 24 | # 60*10, 60*10); 25 | #BSD::Resource::setrlimit(BSD::Resource::RLIMIT_DATA(), 26 | # 40*1024*1024, 40*1024*1024); 27 | BSD::Resource::setrlimit(BSD::Resource::RLIMIT_CORE(), 28 | 40*1024*1024, 40*1024*1024); 29 | 30 | my $builder = eval { 31 | 32 | my $context = PAUSE::Web::Context->new(root => $AppRoot); 33 | $context->init; 34 | 35 | my $pause_app = PAUSE::Web->new(pause => $context); 36 | my $index_app = PAUSE::Web::App::Index->new->to_app; 37 | my $disabled_app = PAUSE::Web::App::Disabled->new->to_app; 38 | 39 | builder { 40 | enable 'LogDispatch', logger => $context->logger; 41 | enable 'ReverseProxy'; 42 | enable 'ServerStatus::Tiny', path => '/status'; 43 | 44 | if (-f "/etc/PAUSE.CLOSED") { 45 | mount '/' => builder { $disabled_app }; 46 | } else { 47 | # Static files are serverd by us; maybe some day we want to change that 48 | enable 'Static', 49 | path => qr{(?:(? "$FindBin::Bin/htdocs"; 51 | 52 | mount '/pub/PAUSE' => builder { 53 | enable '+PAUSE::Web::Middleware::Auth::Basic', context => $context; 54 | Plack::App::Directory::Apaxy->new(root => $PAUSE::Config->{FTPPUB}); 55 | }; 56 | 57 | mount '/incoming' => builder { 58 | enable '+PAUSE::Web::Middleware::Auth::Basic', context => $context; 59 | Plack::App::Directory::Apaxy->new(root => $PAUSE::Config->{INCOMING_LOC}); 60 | }; 61 | 62 | mount '/pause' => builder { 63 | enable_if {$_[0]->{PATH_INFO} =~ /authenquery/ ? 1 : 0} '+PAUSE::Web::Middleware::Auth::Basic', context => $context; 64 | $pause_app->start('psgi'); 65 | }; 66 | 67 | mount '/' => builder { $index_app }; 68 | } 69 | }; 70 | 71 | }; 72 | 73 | if ($@) { 74 | Log::Dispatch::Config->instance->log( 75 | level => 'error', 76 | message => "$@", 77 | ); 78 | } 79 | 80 | $builder; 81 | -------------------------------------------------------------------------------- /bin/emailaddrs_for_cpan_org.pl: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl -w 2 | 3 | use strict; 4 | use lib "/home/k/PAUSE/lib"; 5 | use PAUSE; 6 | use DBI; 7 | 8 | use vars qw(%ALL); 9 | 10 | my $dba = DBI->connect( 11 | $PAUSE::Config->{AUTHEN_DATA_SOURCE_NAME}, 12 | $PAUSE::Config->{AUTHEN_DATA_SOURCE_USER}, 13 | $PAUSE::Config->{AUTHEN_DATA_SOURCE_PW}, 14 | {RaiseError => 1} 15 | ); 16 | my $dbm = DBI->connect( 17 | $PAUSE::Config->{MOD_DATA_SOURCE_NAME}, 18 | $PAUSE::Config->{MOD_DATA_SOURCE_USER}, 19 | $PAUSE::Config->{MOD_DATA_SOURCE_PW}, 20 | {RaiseError => 1} 21 | ); 22 | 23 | my $sth1 = $dbm->prepare(qq{SELECT userid, email 24 | FROM users 25 | WHERE isa_list = '' 26 | AND ( 27 | cpan_mail_alias='publ' 28 | OR 29 | cpan_mail_alias='secr' 30 | )}); 31 | $sth1->execute; 32 | while (my($id,$mail) = $sth1->fetchrow_array) { 33 | $ALL{$id} = $mail; # we store public email even for those who want 34 | # secret, because we never know if we will find a 35 | # secret one 36 | } 37 | $sth1->finish; 38 | my $sth2 = $dbm->prepare(qq{SELECT userid 39 | FROM users 40 | WHERE cpan_mail_alias='secr' 41 | AND isa_list = ''}); 42 | $sth2->execute; 43 | my $sth3 = $dba->prepare(qq{SELECT secretemail 44 | FROM usertable 45 | WHERE user=?}); 46 | while (my($id) = $sth2->fetchrow_array) { 47 | $sth3->execute($id); 48 | next unless $sth3->rows; 49 | my($mail) = $sth3->fetchrow_array or next; 50 | $ALL{$id} = $mail; 51 | } 52 | $sth2->finish; 53 | $sth3->finish; 54 | $dba->disconnect; 55 | $dbm->disconnect; 56 | 57 | while (my($id,$mail) = each %ALL) { 58 | print "$id\t$mail\n"; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | .mkpause 2 | -------------------------------------------------------------------------------- /bootstrap/import-pause-data: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This program is meant to be run on a just-installed bootstrapped PAUSE host. 4 | # It expects that you've gotten MySQL dumps from ../cron/mysql-dump.pl, 5 | # preferably using --extended-insert, and put them in the current working 6 | # directory. It will stop indexing, import all the files from PAUSE, and then 7 | # also all the database content. Then it starts things back up. This can be 8 | # used for testing operations on "real" data, but is also a useful step in 9 | # transitioning to a new PAUSE install in production. 10 | if [ $UID != "0" ]; then 11 | echo "import-mod-db is meant to be run as root" >&2 12 | exit 1; 13 | fi 14 | 15 | if [ ! -e "moddump.current.bz2" -o ! -e "authen_pausedump.current.bz2" ]; then 16 | # The code used to do this: 17 | # rsync -vaP pause.perl.org::pausedata/moddump.current.bz2 . 18 | # 19 | # ...but this only gets the moddump, and really we are going to need authen 20 | # also. 21 | echo "both moddump.current.bz2 and authen_pausedump.current.bz2 must be in cwd" >&2 22 | exit 1; 23 | fi 24 | 25 | touch /etc/PAUSE.CLOSED 26 | 27 | systemctl stop paused 28 | 29 | sudo -u pause rsync --progress -av pause.perl.org::PAUSE/ /data/pause/pub/PAUSE/ 30 | 31 | echo 'SET GLOBAL innodb_flush_log_at_trx_commit=2' | mysql 32 | 33 | bunzip2 moddump.current.bz2 34 | 35 | pv moddump.current | \ 36 | perl -ple 's/^CHANGE MASTER.*//' | \ 37 | sudo mysql mod 38 | 39 | bunzip2 authen_pausedump.current.bz2 40 | 41 | pv authen_pausedump.current | \ 42 | perl -ple 's/^CHANGE MASTER.*//' | \ 43 | sudo mysql authen_pause 44 | 45 | echo 'SET GLOBAL innodb_flush_log_at_trx_commit=1' | mysql 46 | 47 | systemctl start paused 48 | 49 | rm /etc/PAUSE.CLOSED 50 | -------------------------------------------------------------------------------- /corpus/Provides-NoFile-0.50.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/Provides-NoFile-0.50.tar.gz -------------------------------------------------------------------------------- /corpus/case-fakes/Foo-Bar-001.yaml: -------------------------------------------------------------------------------- 1 | name: Foo-Bar 2 | version: 0.001 3 | provides: 4 | Foo::Bar: 5 | version: 0.001 6 | file: lib/Foo/Bar.pm 7 | X_Module_Faker: 8 | cpan_author: FCOME 9 | -------------------------------------------------------------------------------- /corpus/case-fakes/Foo-Bar-002.yaml: -------------------------------------------------------------------------------- 1 | name: Foo-Bar 2 | version: 0.002 3 | provides: 4 | foo::bar: 5 | version: 0.002 6 | file: lib/foo/bar.pm 7 | X_Module_Faker: 8 | cpan_author: FCOME 9 | -------------------------------------------------------------------------------- /corpus/empty.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/empty.txt.gz -------------------------------------------------------------------------------- /corpus/mld/001/authors/A/AA/AAARGH/Mooooooose-0.01.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/001/authors/A/AA/AAARGH/Mooooooose-0.01.tar.gz -------------------------------------------------------------------------------- /corpus/mld/001/authors/O/OO/OOOPPP/Jenkins-Hack-0.11.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/001/authors/O/OO/OOOPPP/Jenkins-Hack-0.11.tar.gz -------------------------------------------------------------------------------- /corpus/mld/001/authors/O/OP/OPRIME/Bug-Gold-9.001.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/001/authors/O/OP/OPRIME/Bug-Gold-9.001.tar.gz -------------------------------------------------------------------------------- /corpus/mld/001/authors/O/OP/OPRIME/CHECKSUMS: -------------------------------------------------------------------------------- 1 | # CHECKSUMS file written on Mon Apr 18 10:35:22 2011 GMT by CPAN::Checksums (v2.07) 2 | $cksum = { 3 | 'Bug-Gold-9.001.tar.gz' => { 4 | 'md5' => 'a450f562155ff2173923d42dd34b5277', 5 | 'md5-ungz' => '6b3b44272f49c8f3cd5b9972dd48cce3', 6 | 'mtime' => '2011-04-18', 7 | 'sha256' => '168e272bc72c4e80afbbbcac9746b816c3922742a504a8449ff112063ceb0204', 8 | 'sha256-ungz' => 'e2d3b15d1c0418bd0209f0a32f070698ea8a36f999f6b20a5dd91a33638440d7', 9 | 'size' => 660 10 | }, 11 | 'XForm-Rollout-1.00.tar.gz' => { 12 | 'md5' => 'a2d5abfc9065cb4dde779cf0e3867a2a', 13 | 'md5-ungz' => '8e7cb18710dc9ef63e063e59105b6c7d', 14 | 'mtime' => '2011-04-18', 15 | 'sha256' => 'ab2498b621f6280b722a204b5d01dc751cebd5caf5da0b8965c741ff91daeb20', 16 | 'sha256-ungz' => '0c20be27b5400fbae08fcbc594c0ee3f118867f5f91bb17bc09612d8ab3dff61', 17 | 'size' => 667 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /corpus/mld/001/authors/O/OP/OPRIME/XForm-Rollout-1.00.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/001/authors/O/OP/OPRIME/XForm-Rollout-1.00.tar.gz -------------------------------------------------------------------------------- /corpus/mld/001/authors/X/XY/XYZZY/CHECKSUMS: -------------------------------------------------------------------------------- 1 | # CHECKSUMS file written on Mon Apr 18 10:35:22 2011 GMT by CPAN::Checksums (v2.07) 2 | $cksum = { 3 | 'Hall-MtKing-0.01.tar.gz' => { 4 | 'md5' => '4a7a096a0f85d717cffe57e1add2592c', 5 | 'md5-ungz' => '0fc12384000e64aa1a03ed36c3aa9b8e', 6 | 'mtime' => '2011-04-18', 7 | 'sha256' => '26c11d15b2d7925475a05ceca9b4de2904b1b6ac352c2feafb8ec8dc9f5c3251', 8 | 'sha256-ungz' => '3f55081c7d405ac037123c3e0715d9d6846c40aaa544f5d4e14c71bfd53e30e4', 9 | 'size' => 664 10 | }, 11 | 'Y-2.tar.gz' => { 12 | 'md5' => 'f273778a0815e56a07b875846c92293a', 13 | 'md5-ungz' => 'b6e50104e74e8b7dbf470cc469af6979', 14 | 'mtime' => '2011-04-18', 15 | 'sha256' => '231ed0327e2fb2a3a26824f23d6718eb1576d98c22839a89eddd73c285e373b4', 16 | 'sha256-ungz' => '975fd51333d684b13c9bcea133679153cd79313665e633de8ae7c45e9ac539d4', 17 | 'size' => 623 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /corpus/mld/001/authors/X/XY/XYZZY/Hall-MtKing-0.01.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/001/authors/X/XY/XYZZY/Hall-MtKing-0.01.tar.gz -------------------------------------------------------------------------------- /corpus/mld/001/authors/X/XY/XYZZY/Y-2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/001/authors/X/XY/XYZZY/Y-2.tar.gz -------------------------------------------------------------------------------- /corpus/mld/dot-pm/authors/O/OP/OPRIME/Matrix.pm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/dot-pm/authors/O/OP/OPRIME/Matrix.pm.gz -------------------------------------------------------------------------------- /corpus/mld/perl6/authors/F/FR/FROGGS/Perl6/Inline-1.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/perl6/authors/F/FR/FROGGS/Perl6/Inline-1.1.tar.gz -------------------------------------------------------------------------------- /corpus/mld/submodule-comaint/README.txt: -------------------------------------------------------------------------------- 1 | # This is a dumb copy of the 009/ directory, but I don't want 2 | # to blindly rely on that in case it changes -------------------------------------------------------------------------------- /corpus/mld/submodule-comaint/authors/O/OO/OOOPPP/Jenkins-Hack-0.14.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/submodule-comaint/authors/O/OO/OOOPPP/Jenkins-Hack-0.14.tar.gz -------------------------------------------------------------------------------- /corpus/mld/submodule-comaint2/README.txt: -------------------------------------------------------------------------------- 1 | # This is a dumb copy of the 009/ directory, but I don't want 2 | # to blindly rely on that in case it changes -------------------------------------------------------------------------------- /corpus/mld/submodule-comaint2/authors/O/OO/OOOPPP/Jenkins-Hack-0.15.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/submodule-comaint2/authors/O/OO/OOOPPP/Jenkins-Hack-0.15.tar.gz -------------------------------------------------------------------------------- /corpus/mld/submodule-firstcome/README.txt: -------------------------------------------------------------------------------- 1 | # This is based on submodule-comaint directory, but 2 | # based on a story discovered by Neil Bowers 3 | -------------------------------------------------------------------------------- /corpus/mld/submodule-firstcome/authors/N/NE/NEILB/Acme-Playpen-2.00.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/corpus/mld/submodule-firstcome/authors/N/NE/NEILB/Acme-Playpen-2.00.tar.gz -------------------------------------------------------------------------------- /cron/CRONTAB.ROOT: -------------------------------------------------------------------------------- 1 | MAILTO=andreas.koenig.5c1c1wmb@franz.ak.mind.de 2 | 3 | PATH=/home/pause/.plenv/shims:/usr/bin:/home/pause/pause/cron 4 | PAUSE_REPO=/home/pause/pause 5 | PAUSE_ROOT=/data/pause/pub/PAUSE 6 | 7 | * * * * * pause $PAUSE_REPO/cron/recentfile-aggregate 8 | 9 | # some kind of PAUSE heartbeat/health check system? 10 | * * * * * pause date -u +"\%s \%a \%b \%e \%T \%Z \%Y" > /tmp/02STAMP && mv /tmp/02STAMP $PAUSE_ROOT/authors/02STAMP && perl -I $PAUSE_REPO/lib -e 'use PAUSE; PAUSE::newfile_hook(shift)' $PAUSE_ROOT/authors/02STAMP 11 | 08 * * * * pause date -u +"\%s \%FT\%TZ" > /tmp/02STAMPm && mv /tmp/02STAMPm $PAUSE_ROOT/modules/02STAMP && perl -I $PAUSE_REPO/lib -e 'use PAUSE; PAUSE::newfile_hook(shift)' $PAUSE_ROOT/modules/02STAMP 12 | 13 | # THE INDEXER 14 | 52 * * * * pause $PAUSE_REPO/cron/mldistwatch --logfile /home/pause/log/mldistwatch.cron.log 15 | 04 7 * * 6 pause $PAUSE_REPO/cron/mldistwatch --logfile /home/pause/log/mldistwatch.cron.log --symlinkinventory 16 | 17,29,41,53 * * * * pause $PAUSE_REPO/cron/mldistwatch --logfile /home/pause/log/mldistwatch.cron.log --fail-silently-on-concurrency-protection --rewrite 17 | 18 | 12 06,14,22 * * * pause $PAUSE_REPO/cron/update-checksums.pl 19 | 29 * * * * pause $PAUSE_REPO/cron/cleanup-incoming.pl 20 | 59 * * * * pause $PAUSE_REPO/cron/cron-daily.pl 21 | 37 05 * * * pause $PAUSE_REPO/cron/gmls-lR.pl 22 | 47 07,13,19,01 * * * pause $PAUSE_REPO/cron/mysql-dump.pl 23 | 21 */6 * * * pause $PAUSE_REPO/cron/rm_stale_links 24 | 22 * * * * pause $PAUSE_REPO/cron/sync-04pause.pl 25 | 10 09,15,21,03 * * * pause cd $PAUSE_ROOT/PAUSE-git && (git gc -q && git push -q -u origin master) 26 | 18 * * * * pause $PAUSE_REPO/cron/cron-p6daily.pl 27 | -------------------------------------------------------------------------------- /cron/cleanup-incoming.pl: -------------------------------------------------------------------------------- 1 | #!/home/pause/.plenv/shims/perl 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use PAUSE (); 5 | use DBI; 6 | use File::Spec; 7 | 8 | use PAUSE::Logger '$Logger' => { init => { 9 | ident => 'pause-cleanup-incoming', 10 | facility => 'daemon', 11 | } }; 12 | 13 | my $incdir = File::Spec->canonpath($PAUSE::Config->{INCOMING_LOC}); 14 | 15 | my $dbh = DBI->connect( 16 | $PAUSE::Config->{MOD_DATA_SOURCE_NAME}, 17 | $PAUSE::Config->{MOD_DATA_SOURCE_USER}, 18 | $PAUSE::Config->{MOD_DATA_SOURCE_PW}, 19 | { RaiseError => 1 } 20 | ); 21 | 22 | my $sth = $dbh->prepare("SELECT * FROM uris where uri=?"); 23 | 24 | opendir DIR, $incdir or die; 25 | for my $dirent (readdir DIR) { 26 | next if $dirent =~ /^\.(|\.|message)\z/; 27 | my $absdirent = File::Spec->catfile($incdir,$dirent); 28 | next unless -f $absdirent; 29 | next if -M $absdirent < 1/24; 30 | $sth->execute($dirent); 31 | next if $sth->rows > 0; 32 | if ($dirent =~ /-withoutworldwriteables/) { 33 | my $representing = $dirent; 34 | $representing =~ s/-withoutworldwriteables//; 35 | $sth->execute($representing); 36 | next if $sth->rows > 0; 37 | } 38 | my $size = -s $absdirent; 39 | 40 | unlink $absdirent or die "Could not unlink $absdirent: $!"; 41 | $Logger->log("unlinked $absdirent ($size)"); 42 | } 43 | closedir DIR; 44 | -------------------------------------------------------------------------------- /cron/mysql-dump.pl: -------------------------------------------------------------------------------- 1 | #!/home/pause/.plenv/shims/perl 2 | 3 | =pod 4 | 5 | Before extended-insert: 6 | 7 | -rw-r--r-- 1 root root 39114962 Jan 6 15:47 moddump.current 8 | -rw-r--r-- 1 root root 7031636 Jan 6 15:47 moddump.200801061447GMT.bz2 9 | 10 | After extended-insert: 11 | 12 | -rw-r--r-- 1 root root 50195254 Jan 6 17:47 moddump.current 13 | -rw-r--r-- 1 root root 7203437 Jan 6 17:47 moddump.200801061647GMT.bz2 14 | 15 | =cut 16 | 17 | use strict; 18 | use warnings; 19 | 20 | use FindBin; 21 | use lib "$FindBin::Bin/../lib"; 22 | use PAUSE (); 23 | 24 | use PAUSE::Logger '$Logger' => { init => { 25 | ident => 'pause-mysql-dump', 26 | facility => 'daemon', 27 | } }; 28 | 29 | my @m=gmtime; 30 | $m[5]+=1900; 31 | $m[4]++; 32 | my $D = sprintf "%04d%02d%02d%02d%02dGMT",@m[5,4,3,2,1]; 33 | my $BZIP = $PAUSE::Config->{BZIP2_PATH}; 34 | die "where is BZIP" unless -x $BZIP; 35 | use File::Path (); 36 | use File::Basename (); 37 | use Getopt::Long qw(GetOptions); 38 | 39 | my $extended_insert = 0; 40 | my $override_backupdir; 41 | GetOptions( 42 | "extended-insert=i" => \$extended_insert, 43 | "override-backupdir=s" => \$override_backupdir 44 | ) or die("Error in command line arguments\n"); 45 | 46 | my $Struct = [ 47 | {backupdir => "$PAUSE::Config->{FTPPUB}/PAUSE-data", 48 | cfg_dsn => "MOD_DATA_SOURCE_NAME", 49 | cfg_user => "MOD_DATA_SOURCE_USER", 50 | cfg_pw => "MOD_DATA_SOURCE_PW", 51 | }, 52 | {backupdir => $PAUSE::Config->{AUTHEN_BACKUP_DIR}, 53 | cfg_dsn => "AUTHEN_DATA_SOURCE_NAME", 54 | cfg_user => "AUTHEN_DATA_SOURCE_USER", 55 | cfg_pw => "AUTHEN_DATA_SOURCE_PW", 56 | }, 57 | ]; 58 | for my $struct (@$Struct) { 59 | my $backup_dir = $override_backupdir || $struct->{backupdir}; 60 | File::Path::mkpath $backup_dir; 61 | my($dbi,$dbengine,$db) = split /:/, $PAUSE::Config->{$struct->{cfg_dsn}}; 62 | die "Script would not work for $dbengine" unless $dbengine =~ /mysql/i; 63 | my $user = $PAUSE::Config->{$struct->{cfg_user}}; 64 | my $password = $PAUSE::Config->{$struct->{cfg_pw}}; 65 | for my $var ($db,$user,$password) { 66 | die "suspicious variable var[$var]" if $var =~ /[\'\"\;]/; 67 | } 68 | my $master_data = ""; 69 | if ($struct->{master}) { 70 | $master_data = " --master-data"; 71 | } 72 | system "mysqldump$master_data --lock-tables --add-drop-table --user='$user' --password='$password' '--extended-insert=$extended_insert' '$db' > $backup_dir/.${db}dump.current"; 73 | rename "$backup_dir/.${db}dump.current", "$backup_dir/${db}dump.current"; 74 | unlink "$backup_dir/${db}dump.current.bz2"; 75 | system "$BZIP -9 --keep --small $backup_dir/${db}dump.current"; 76 | system "/bin/cp $backup_dir/${db}dump.current.bz2 $backup_dir/${db}dump.$D.bz2"; 77 | } 78 | -------------------------------------------------------------------------------- /cron/recentfile-aggregate: -------------------------------------------------------------------------------- 1 | #!/home/pause/.plenv/shims/perl 2 | use v5.36.0; 3 | 4 | use FindBin; 5 | use lib "$FindBin::Bin/../lib"; 6 | 7 | use PAUSE; 8 | use Path::Tiny; 9 | 10 | use PAUSE::Logger '$Logger' => { init => { 11 | ident => 'pause-recentfile-aggregate', 12 | facility => 'daemon', 13 | } }; 14 | 15 | my $PAUSE_ROOT = $PAUSE::Config->{FTPPUB}; 16 | 17 | die "FTPPUB directory ($PAUSE_ROOT) isn't there!\n" 18 | unless -d $PAUSE_ROOT; 19 | 20 | my $root = path($PAUSE_ROOT); 21 | 22 | system( 23 | '/home/pause/.plenv/shims/rrr-aggregate', 24 | $root->child('authors/RECENT-1h.yaml'), 25 | ); 26 | 27 | system( 28 | '/home/pause/.plenv/shims/rrr-aggregate', 29 | $root->child('modules/RECENT-1h.yaml'), 30 | ); 31 | -------------------------------------------------------------------------------- /cron/rm_stale_links: -------------------------------------------------------------------------------- 1 | #!/home/pause/.plenv/shims/perl 2 | 3 | =pod 4 | 5 | misnomer 6 | 7 | we do not only remove links but also CHECKSUMS files from directories 8 | that contain nothing but them. And empty directories. 9 | 10 | And we call the delfile hook for the CHECKSUMS files. Up to recently 11 | we called the delfile hook with a relative path so the hook dropped it 12 | on the floor:-( 13 | 14 | =cut 15 | 16 | use FindBin; 17 | use lib "$FindBin::Bin/../lib"; 18 | use PAUSE (); 19 | 20 | use PAUSE::Logger '$Logger' => { init => { 21 | ident => 'pause-rm-stale-links', 22 | facility => 'daemon', 23 | } }; 24 | 25 | use strict; 26 | use warnings; 27 | 28 | use File::Find; 29 | use File::Spec; 30 | chdir "$PAUSE::Config->{MLROOT}../.."; 31 | 32 | my %KEEP_FOREVER = ( 33 | # No matter what, do not delete these paths! For an example of why this is 34 | # interesting, imagine a freshly installed PAUSE that has no files uploaded 35 | # yet. Without protecting authors/id, it could be deleted. Later, something 36 | # will try to upload authors/id/X/XY/XYZZY/Foo-1.23.tar.gz, but it can't, 37 | # because authors/id has been removed. Possibly it should be willing to 38 | # create the full tree, but right now, it can't. So, we will avoid deleting 39 | # it instead. 40 | 'authors/id' => 1, 41 | ); 42 | 43 | find( 44 | { 45 | bydepth => 1, 46 | wanted => sub { 47 | return if /^\.\.?$/; 48 | return if $KEEP_FOREVER{ $File::Find::name }; 49 | my($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_); 50 | if (-l $_ && ! -e $_){ 51 | $Logger->log("unlinking stale $File::Find::name"); 52 | unlink $_; 53 | # PAUSE::delfile_hook(File::Spec->rel2abs($_)); # do we track symlinks? 54 | } 55 | if ($_ eq "CHECKSUMS") { 56 | opendir DIR, "."; 57 | my @readdir = readdir DIR; 58 | closedir DIR; 59 | if (@readdir == 3) { 60 | $Logger->log("unlinking orphaned $File::Find::name"); 61 | unlink $_ or die "Could not unlink $_: $!"; 62 | PAUSE::delfile_hook(File::Spec->rel2abs($_)); # definitely needed 63 | } 64 | } 65 | return if -l $_; 66 | ($dev,$ino,$mode,$nlink,$uid,$gid) = stat($_); 67 | if (-d _ and $nlink == 2) { # directory without subdir 68 | opendir DIR, $_; 69 | my @readdir = readdir DIR; 70 | closedir DIR; 71 | if (@readdir == 2) { 72 | $Logger->log("rmdirring empty $File::Find::name"); 73 | rmdir $_ or die "Could not rmdir $_: $!"; 74 | # PAUSE::delfile_hook(File::Spec->rel2abs($_)); # we do not track directories 75 | } 76 | } 77 | }, 78 | }, 79 | "authors", "modules" 80 | ); 81 | -------------------------------------------------------------------------------- /cron/sync-04pause.pl: -------------------------------------------------------------------------------- 1 | #!/home/pause/.plenv/shims/perl 2 | 3 | use FindBin; 4 | use lib "$FindBin::Bin/../lib"; 5 | use PAUSE (); 6 | 7 | use PAUSE::Logger '$Logger' => { init => { 8 | ident => 'pause-sync-04pause', 9 | facility => 'daemon', 10 | } }; 11 | 12 | $ENV{LANG} = "C"; 13 | my $target = "$PAUSE::Config->{FTPPUB}/modules/"; 14 | open my $fh, "-|", "rsync -av $FindBin::Bin/../htdocs/0*.html $target" or die "Could not fork: $!"; 15 | while (<$fh>) { 16 | next if /^building file list/; 17 | next if /^sent\s.+received/; 18 | last if /^wrote \d+/; 19 | last if /^total size is/; 20 | chomp; 21 | next unless -e "$target/$_"; 22 | PAUSE::newfile_hook("$target/$_"); 23 | } 24 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # PAUSE: The Perl Author Upload SErver 2 | 3 | * [The PAUSE Operating Model](operating-model.md) 4 | * [The PAUSE Privacy Policy](privacy-policy.md) 5 | * [How to install PAUSE](installing-pause.md) 6 | * [A Quick Tour of PAUSE's Setup](quick-tour.md) 7 | -------------------------------------------------------------------------------- /doc/schemas/README: -------------------------------------------------------------------------------- 1 | This directory contains schemas for different databases that are 2 | equivalent to the official PAUSE/MySQL schemas. They were created 3 | with SQL::Translator as follows (e.g for SQLite): 4 | 5 | $ sqlt -f MySQL -t SQLite mod.schema.txt > mod.schema.sqlite 6 | 7 | -------------------------------------------------------------------------------- /doc/schemas/authen_pause.schema.sqlite: -------------------------------------------------------------------------------- 1 | -- 2 | -- Created by SQL::Translator::Producer::SQLite 3 | -- Created on Sat Aug 13 10:46:32 2011 4 | -- 5 | 6 | BEGIN TRANSACTION; 7 | 8 | -- 9 | -- Table: abrakadabra 10 | -- 11 | CREATE TABLE abrakadabra ( 12 | user char(16) NOT NULL DEFAULT '', 13 | chpasswd char(32) NOT NULL DEFAULT '', 14 | expires datetime DEFAULT NULL, 15 | PRIMARY KEY (user) 16 | ); 17 | 18 | -- 19 | -- Table: grouptable 20 | -- 21 | CREATE TABLE grouptable ( 22 | user char(12) NOT NULL DEFAULT '', 23 | ugroup char(8) NOT NULL DEFAULT '' 24 | ); 25 | 26 | CREATE UNIQUE INDEX user_ugroup ON grouptable (user, ugroup); 27 | 28 | -- 29 | -- Table: usertable 30 | -- 31 | CREATE TABLE usertable ( 32 | user char(12) NOT NULL DEFAULT '', 33 | password char(13) DEFAULT NULL, 34 | secretemail char(255) DEFAULT NULL, 35 | forcechange tinyint(4) DEFAULT 0, 36 | changed int(11) DEFAULT NULL, 37 | changedby char(10) DEFAULT NULL, 38 | lastvisit datetime DEFAULT NULL, 39 | PRIMARY KEY (user) 40 | ); 41 | 42 | COMMIT; 43 | -------------------------------------------------------------------------------- /etc/aliases: -------------------------------------------------------------------------------- 1 | # 2 | # Mail aliases for sendmail 3 | # 4 | # You must run newaliases(1) after making changes to this file. 5 | # 6 | 7 | # Required aliases 8 | postmaster: root 9 | MAILER-DAEMON: postmaster 10 | 11 | # Common aliases 12 | abuse: postmaster 13 | spam: postmaster 14 | 15 | # Other aliases 16 | # General redirections for pseudo accounts. 17 | bin: root 18 | daemon: root 19 | games: root 20 | ingres: root 21 | nobody: root 22 | system: root 23 | toor: root 24 | uucp: root 25 | 26 | # Well-known aliases. 27 | manager: root 28 | dumper: root 29 | operator: root 30 | 31 | # trap decode to catch security attacks 32 | decode: root 33 | 34 | # Person who should get root's mail 35 | root: k 36 | upload: k 37 | koenig: k 38 | a.koenig: k 39 | andreas.koenig: k 40 | dubravka.koenig: k 41 | pause: k 42 | logcheck: k 43 | 44 | # Mailinglists 45 | security: k, kstar@cpan.org, bdfoy@cpan.org, jv@cpan.org, gbarr@cpan.org, smueller@cpan.org, adamk@cpan.org, dagolden@cpan.org, abh@cpan.org 46 | -------------------------------------------------------------------------------- /etc/init.d/PAUSE-paused: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | PATH=/bin:/usr/bin:/sbin:/usr/sbin 4 | DAEMON=/home/k/pause/bin/paused 5 | PIDFILE=/var/run/paused.pid 6 | 7 | ARGS="--pidfile=$PIDFILE" 8 | 9 | test -x $DAEMON || exit 0 10 | 11 | case "$1" in 12 | start) 13 | echo -n "Starting paused" 14 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS & 15 | echo "." 16 | ;; 17 | stop) 18 | echo -n "Stopping paused" 19 | kill -TERM `cat $PIDFILE` 20 | rm $PIDFILE 21 | echo "." 22 | ;; 23 | reload) 24 | if [ -f $PIDFILE ] ; then kill -HUP `cat $PIDFILE` ; fi 25 | ;; 26 | force-reload|restart) 27 | sh $0 stop 28 | sh $0 start 29 | ;; 30 | *) 31 | echo "Usage: $0 {start|stop|restart|force-reload|reload}" 32 | exit 1 33 | ;; 34 | esac 35 | 36 | exit 0 37 | -------------------------------------------------------------------------------- /etc/init.d/PAUSE-perlbal: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Startup script for the Apache Web Server 4 | # 5 | # chkconfig: 345 85 15 6 | # description: loadbalancer 7 | # processname: perlbal 8 | # config: /etc/perlbal/perlbal.conf 9 | 10 | 11 | # Source function library. 12 | SLEEP=1 13 | 14 | DAEMON=/usr/local/perl-5.12.0-RC5/bin/perlbal 15 | 16 | # See how we were called. 17 | case "$1" in 18 | start) 19 | echo -n "Starting perlbal: " 20 | nice -7 $DAEMON --daemon 21 | echo 22 | touch /var/lock/perlbal 23 | ;; 24 | stop) 25 | echo -n "Shutting down perlbal: " 26 | killall perlbal 27 | echo perlbal 28 | rm -f /var/lock/perlbal 29 | ;; 30 | status) 31 | status perlbal 32 | ;; 33 | restart) 34 | $0 stop 35 | echo Sleeping $SLEEP seconds 36 | sleep $SLEEP 37 | $0 start 38 | ;; 39 | reload) 40 | echo -n "Reloading perlbal: " 41 | killall -HUP perlbal 42 | echo perlbal 43 | ;; 44 | *) 45 | echo "Usage: $0 {start|stop|restart|reload|status}" 46 | exit 1 47 | esac 48 | 49 | exit 0 50 | -------------------------------------------------------------------------------- /etc/init.d/PAUSE-rsyncd: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | PATH=/bin:/usr/bin:/sbin:/usr/sbin 4 | DAEMON=/usr/bin/rsync 5 | # given that this filename is PAUSE-rsyncd and the conf file is rsyncd.conf 6 | # I plead for rsyncd.pid 7 | PIDFILE=/var/run/rsyncd.pid 8 | 9 | ARGS="--daemon" 10 | 11 | test -x $DAEMON || exit 0 12 | 13 | case "$1" in 14 | start) 15 | echo -n "Starting rsync" 16 | start-stop-daemon --verbose --start --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- $ARGS & 17 | echo "." 18 | ;; 19 | stop) 20 | echo -n "Stopping rsync" 21 | start-stop-daemon --verbose --stop --pidfile $PIDFILE --exec $DAEMON -- $ARGS 22 | echo "." 23 | ;; 24 | reload) 25 | echo "Not implemented." 26 | ;; 27 | force-reload|restart) 28 | sh $0 stop 29 | sh $0 start 30 | ;; 31 | *) 32 | echo "Usage: /etc/init.d/PAUSE-rsyncd {start|stop|restart|force-reload|reload}" 33 | exit 1 34 | ;; 35 | esac 36 | 37 | exit 0 38 | -------------------------------------------------------------------------------- /etc/init.d/PAUSE-rsyncd2: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | PATH=/bin:/usr/bin:/sbin:/usr/sbin 4 | DAEMON=/usr/bin/rsync 5 | # given that this filename is PAUSE-rsyncd and the conf file is rsyncd.conf 6 | # I plead for rsyncd.pid 7 | PIDFILE=/var/run/rsyncd2.pid 8 | 9 | ARGS="--daemon --config=/etc/rsyncd2.conf" 10 | 11 | test -x $DAEMON || exit 0 12 | 13 | case "$1" in 14 | start) 15 | echo -n "Starting rsync" 16 | start-stop-daemon --verbose --start --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- $ARGS & 17 | echo "." 18 | ;; 19 | stop) 20 | echo -n "Stopping rsync" 21 | start-stop-daemon --verbose --stop --pidfile $PIDFILE --exec $DAEMON -- $ARGS 22 | echo "." 23 | ;; 24 | reload) 25 | echo "Not implemented." 26 | ;; 27 | force-reload|restart) 28 | sh $0 stop 29 | sh $0 start 30 | ;; 31 | *) 32 | echo "Usage: /etc/init.d/PAUSE-rsyncd2 {start|stop|restart|force-reload|reload}" 33 | exit 1 34 | ;; 35 | esac 36 | 37 | exit 0 38 | -------------------------------------------------------------------------------- /etc/logrotate.d/csync2: -------------------------------------------------------------------------------- 1 | /var/log/csync2.log { 2 | rotate 14 3 | weekly 4 | compress 5 | missingok 6 | notifempty 7 | } 8 | -------------------------------------------------------------------------------- /etc/logrotate.d/mldistwatch: -------------------------------------------------------------------------------- 1 | /var/log/mldistwatch*.log { 2 | rotate 28 3 | weekly 4 | compress 5 | missingok 6 | notifempty 7 | } 8 | -------------------------------------------------------------------------------- /etc/logrotate.d/rsyncd: -------------------------------------------------------------------------------- 1 | /var/log/rsyncd /var/log/rsyncd2 { 2 | rotate 28 3 | weekly 4 | compress 5 | missingok 6 | notifempty 7 | } 8 | -------------------------------------------------------------------------------- /etc/mon/mon.cf: -------------------------------------------------------------------------------- 1 | # $Id: mon.cf,v 1.3 1999/09/29 16:08:16 roderick Exp $ 2 | # 3 | # /etc/mon/mon.cf, configuration file for mon 4 | # 5 | # Run `/etc/init.d/mon reload' after editing this file in order for your 6 | # changes to take effect. 7 | 8 | # There is no default configuration for mon. The docs most useful 9 | # for setting up your /etc/mon/mon.cf file are the mon(1) man page, 10 | # /usr/share/doc/mon/README.hints, /usr/share/doc/mon/README.monitors 11 | # and /usr/share/doc/mon/examples/mon.cf. 12 | 13 | hostgroup pause / /home /home/ftp /tmp /var 14 | 15 | hostgroup paused localhost 16 | 17 | hostgroup rsyncd localhost 18 | 19 | hostgroup rsyncd2 localhost 20 | 21 | hostgroup threeware localhost 22 | 23 | hostgroup rersyncrecent authors modules 24 | 25 | # Monitor free disk space on the server 26 | # 27 | watch pause 28 | service freespace 29 | interval 1m 30 | monitor freespace.monitor /:500000 /home:2000000 /home/ftp:30000000 /tmp:2000000 /var:1000000 31 | period wd {Sun-Sat} 32 | alert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 33 | alertevery 3h 34 | upalert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 35 | 36 | # Monitor PAUSE daemon running 37 | # 38 | watch paused 39 | service paused 40 | interval 1h 41 | monitor paused.monitor 42 | period wd {Sun-Sat} 43 | alert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 44 | alertevery 3h 45 | 46 | watch rsyncd 47 | service basic 48 | interval 1h 49 | monitor rsyncd.monitor 50 | period wd {Sun-Sat} 51 | alert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 52 | alertevery 3h 53 | 54 | watch rsyncd2 55 | service basic 56 | interval 2h 57 | monitor rsyncd2.monitor 58 | period wd {Sun-Sat} 59 | alert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 60 | alertevery 2h 61 | 62 | watch threeware 63 | service basic 64 | description discover degraded disks 65 | interval 10m 66 | monitor 3ware_cli.monitor 67 | period wd {Su-Sa} 68 | alert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 69 | upalert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 70 | alertevery 2h 71 | comp_alerts 72 | 73 | watch rersyncrecent 74 | service basic 75 | description missings on disk or index 76 | interval 1h 77 | monitor rersyncrecent.monitor 78 | period wd {Su-Sa} 79 | alert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 80 | upalert mail.alert andreas.koenig.7os6VVqR@franz.ak.mind.de 81 | alertevery 12h 82 | comp_alerts 83 | -------------------------------------------------------------------------------- /etc/mon/mon.d/3ware_cli.monitor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # $HeadURL$ 4 | # $Id$ 5 | 6 | my $runfile = "/var/run/tw_cli"; 7 | open my $fh, $runfile or exit 0; # after boot 8 | my $DIE; 9 | while (<$fh>){ 10 | if (/NotOptimal .* = \s+ (\d+) /xi && $1>0){ 11 | print; 12 | $DIE++; 13 | } 14 | } 15 | close $fh or die "Could not close: $!"; 16 | exit 1 if $DIE; 17 | -------------------------------------------------------------------------------- /etc/mon/mon.d/README: -------------------------------------------------------------------------------- 1 | Files in this directory have a corresponding symlink in /usr/lib/mon/mon.d 2 | -------------------------------------------------------------------------------- /etc/mon/mon.d/paused.monitor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | use strict; 4 | open P, "ps auxww |"; 5 | my $running; 6 | while (

){ 7 | next unless m{ ^ root .* 8 | ( 9 | perl .* /bin/paused \s # before we set arg0 10 | | 11 | paused: 12 | ) 13 | }x; 14 | $running++; 15 | } 16 | close P or die "Could not close P"; 17 | unless ($running){ 18 | print "Process paused not found\n"; 19 | exit 1; 20 | } 21 | -------------------------------------------------------------------------------- /etc/mon/mon.d/rersyncrecent.monitor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $aumu = shift or die "Usage: ... "; 7 | 8 | chdir "/home/k/sources/rersyncrecent" or die "could not chdir: $!"; 9 | open my $fh, "perl -I lib bin/rrr-fsck -n --verbose /home/ftp/pub/PAUSE/$aumu/RECENT.recent 2>&1 |" or die "could not fork: $!"; 10 | 11 | my $ret = 0; 12 | while (<$fh>) { 13 | if ($ret){ 14 | print; 15 | next; 16 | } 17 | next unless my($what,$n) = /^(not\s.+?):\s+(\d+)/; 18 | next if $n == 0; 19 | $ret = 1; 20 | print; 21 | } 22 | exit $ret; 23 | 24 | __END__ 25 | 26 | # Local Variables: 27 | # mode: cperl 28 | # cperl-indent-level: 4 29 | # End: 30 | -------------------------------------------------------------------------------- /etc/mon/mon.d/rsyncd.monitor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | use strict; 4 | open P, "rsync pause.perl.org:: |"; 5 | my $running; 6 | while (

){ 7 | next unless m{ ^ PAUSE | authors | modules | scripts }x; 8 | $running++; 9 | } 10 | close P or die "Could not close P"; 11 | unless ($running >= 4){ 12 | print "Some rsync target missing\n"; 13 | exit 1; 14 | } 15 | -------------------------------------------------------------------------------- /etc/mon/mon.d/rsyncd2.monitor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | use strict; 4 | $ENV{USER} = "andk"; 5 | $ENV{RSYNC_PASSWD} = "not_the_password"; 6 | 7 | open my $P, "rsync --port=8732 pause.perl.org::PAUSE 2>&1 |" or die "Could not fork: $!"; 8 | my $running; 9 | my @got; 10 | while (<$P>){ 11 | push @got, $_; 12 | next unless m{ ERROR }ix; 13 | $running++; 14 | } 15 | close $P; # must fail, rsync asks for password and refuses to run! # or die "Could not close: $!"; 16 | unless ($running >= 1){ 17 | local $"=""; 18 | print "error message missing, got[@got]\n"; 19 | exit 1; 20 | } 21 | -------------------------------------------------------------------------------- /etc/motd: -------------------------------------------------------------------------------- 1 | 2 | welcome oooooooooo o ooooo oooo oooooooo8 ooooooooooo 3 | to 888 888 888 888 88 888 888 88 4 | 888oooo88 8 88 888 88 888oooooo 888ooo8 5 | 888 8oooo88 888 88 888 888 oo 6 | o888o o88o o888o 888oo88 o88oooo888 o888ooo8888 7 | 8 | You're probably here to check whether things are working, or to deploy 9 | and update to PAUSE. For more information on doing this stuff, check the 10 | docs: https://github.com/andk/pause/tree/master/doc 11 | 12 | They're not thorough yet, but they will get better. 13 | 14 | To act as the pause user, remember to run: sudo -u pause -i 15 | 16 | 17 | -------------------------------------------------------------------------------- /etc/plack_log.conf.development: -------------------------------------------------------------------------------- 1 | dispatchers = screen 2 | 3 | screen.class = Log::Dispatch::Screen 4 | screen.min_level = debug 5 | screen.format = [%d{%Y-%m-%d %H:%M:%S}] [%p] %m%n 6 | -------------------------------------------------------------------------------- /etc/plack_log.conf.ghaction: -------------------------------------------------------------------------------- 1 | dispatchers = file 2 | 3 | file.class = Log::Dispatch::File 4 | file.min_level = debug 5 | file.format = [%d{%Y-%m-%d %H:%M:%S}] [%p] %m%n 6 | file.filename = "/tmp/plack.log" 7 | file.mode = ">>" -------------------------------------------------------------------------------- /etc/plack_log.conf.production: -------------------------------------------------------------------------------- 1 | dispatchers = file 2 | 3 | file.class = Log::Dispatch::File 4 | file.min_level = debug 5 | file.filename = /var/log/PAUSE-plack/error_log_mojo 6 | file.mode = append 7 | file.format = [%d{%Y-%m-%d %H:%M:%S}] [%p] %m%n 8 | -------------------------------------------------------------------------------- /etc/plack_log.conf.travis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/etc/plack_log.conf.travis -------------------------------------------------------------------------------- /etc/rsyncd.conf: -------------------------------------------------------------------------------- 1 | max connections = 12 2 | pid file = /var/run/PAUSE-rsyncd.pid 3 | transfer logging = true 4 | use chroot = true 5 | timeout = 600 6 | 7 | [PAUSE] 8 | path = /data/pause/pub/PAUSE 9 | 10 | [authors] 11 | path = /data/pause/pub/PAUSE/authors 12 | 13 | [modules] 14 | path = /data/pause/pub/PAUSE/modules 15 | 16 | [scripts] 17 | path = /data/pause/pub/PAUSE/scripts/new 18 | 19 | [pausedata] 20 | path = /data/pause/pub/PAUSE/PAUSE-data 21 | 22 | [pausecode] 23 | path = /data/pause/pub/PAUSE/PAUSE-code 24 | 25 | [pausegit] 26 | path = /data/pause/pub/PAUSE/PAUSE-git 27 | END 28 | -------------------------------------------------------------------------------- /etc/security/limits.conf: -------------------------------------------------------------------------------- 1 | # /etc/security/limits.conf 2 | 3 | # $Id$ 4 | 5 | # 6 | #Each line describes a limit for a user in the form: 7 | # 8 | # 9 | # 10 | #Where: 11 | # can be: 12 | # - an user name 13 | # - a group name, with @group syntax 14 | # - the wildcard *, for default entry 15 | # 16 | # can have the two values: 17 | # - "soft" for enforcing the soft limits 18 | # - "hard" for enforcing hard limits 19 | # 20 | # can be one of the following: 21 | # - core - limits the core file size (KB) 22 | # - data - max data size (KB) 23 | # - fsize - maximum filesize (KB) 24 | # - memlock - max locked-in-memory address space (KB) 25 | # - nofile - max number of open files 26 | # - rss - max resident set size (KB) 27 | # - stack - max stack size (KB) 28 | # - cpu - max CPU time (MIN) 29 | # - nproc - max number of processes 30 | # - as - address space limit 31 | # - maxlogins - max number of logins for this user 32 | # - priority - the priority to run user process with 33 | # 34 | # 35 | # 36 | 37 | * hard core 40000 38 | * soft core 20000 39 | #* hard rss 10000 40 | #@student hard nproc 20 41 | #@faculty soft nproc 20 42 | #@faculty hard nproc 50 43 | ftp hard nproc 0 44 | ftp hard cpu 60 45 | ftp soft cpu 10 46 | UNSAFE hard cpu 60 47 | UNSAFE soft cpu 10 48 | UNSAFE hard data 300000 49 | UNSAFE soft data 200000 50 | UNSAFE hard as 300000 51 | UNSAFE soft as 200000 52 | UNSAFE hard rss 300000 53 | UNSAFE soft rss 200000 54 | @student - maxlogins 4 55 | 56 | # End of file 57 | -------------------------------------------------------------------------------- /htdocs/.well-known/acme-challenge/README: -------------------------------------------------------------------------------- 1 | Directory reserved for Letsencrypt/ACME challenges 2 | -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/archive.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/audio.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/authors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/authors.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/bin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/bin.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/blank.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/bmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/bmp.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/c.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/calc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/calc.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/cd.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/copying.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/copying.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/cpp.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/css.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/deb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/deb.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/default.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/diff.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/doc.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/draw.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/eps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/eps.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/exe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/exe.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/folder-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/folder-home.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/folder-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/folder-open.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/folder-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/folder-page.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/folder-parent-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/folder-parent-old.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/folder-parent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/folder-parent.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/folder.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/gif.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/gzip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/gzip.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/h.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/hpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/hpp.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/html.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/ico.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/image.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/install.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/java.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/jpg.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/js.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/json.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/log.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/makefile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/makefile.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/markdown.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/package.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/pdf.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/perl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/perl.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/php.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/playlist.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/png.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/pres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/pres.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/ps.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/psd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/psd.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/py.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/rar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/rar.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/rb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/rb.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/readme.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/rpm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/rpm.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/rss.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/rtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/rtf.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/script.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/source.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/sql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/sql.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/tar.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/tex.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/text.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/tiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/tiff.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/unknown.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/vcal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/vcal.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/video.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/xml.png -------------------------------------------------------------------------------- /htdocs/_apaxy/icons/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/_apaxy/icons/zip.png -------------------------------------------------------------------------------- /htdocs/admin.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/admin.html -------------------------------------------------------------------------------- /htdocs/imprint.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |

(page required by German law)

7 | Andreas König
8 | Paretzer Str. 7
9 | 10713 Berlin
10 | <andreas.koenig.7os6VVqR@franz.ak.mind.de> 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /htdocs/password.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Passwords on the PAUSE 7 | 8 | 9 |

Passwords on the PAUSE

10 | 11 | Please visit the password 13 | changer. 14 | 15 | 16 | -------------------------------------------------------------------------------- /htdocs/pause/hw-pause-2006-small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/hw-pause-2006-small.jpg -------------------------------------------------------------------------------- /htdocs/pause/hw-pause-2006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/hw-pause-2006.jpg -------------------------------------------------------------------------------- /htdocs/pause/logo9-sm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/logo9-sm.gif -------------------------------------------------------------------------------- /htdocs/pause/logo9-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/logo9-sm.png -------------------------------------------------------------------------------- /htdocs/pause/logo9a-sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/logo9a-sm.jpg -------------------------------------------------------------------------------- /htdocs/pause/logo9a-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/logo9a-sm.png -------------------------------------------------------------------------------- /htdocs/pause/logol1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/logol1.gif -------------------------------------------------------------------------------- /htdocs/pause/logol1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/logol1.png -------------------------------------------------------------------------------- /htdocs/pause/min.css: -------------------------------------------------------------------------------- 1 | /* Copyright 2014 Owen Versteeg; MIT licensed */ 2 | body,textarea,input,select{background:0;border-radius:0;font:16px sans-serif;margin:0}.addon,.btn-sm,.nav,textarea,input,select{outline:0;font-size:14px}.smooth{transition:all .2s}.btn,.nav a{text-decoration:none}.container{margin:0 20px;width:auto}@media(min-width:1310px){.container{margin:auto;width:1270px}}.btn,h2{font-size:2em}h1{font-size:3em}.btn{background:#999;border-radius:6px;border:0;color:#fff;cursor:pointer;display:inline-block;margin:2px 0;padding:12px 30px 14px}.btn:hover{background:#888}.btn:active,.btn:focus{background:#777}.btn-a{background:#0ae}.btn-a:hover{background:#09d}.btn-a:active,.btn-a:focus{background:#08b}.btn-b{background:#3c5}.btn-b:hover{background:#2b4}.btn-b:active,.btn-b:focus{background:#2a4}.btn-c{background:#d33}.btn-c:hover{background:#c22}.btn-c:active,.btn-c:focus{background:#b22}.btn-sm{border-radius:4px;padding:10px 14px 11px}.row{margin:1% 0;overflow:auto}.col{float:left}.table,.c12{width:100%}.c11{width:91.66%}.c10{width:83.33%}.c9{width:75%}.c8{width:66.66%}.c7{width:58.33%}.c6{width:50%}.c5{width:41.66%}.c4{width:33.33%}.c3{width:25%}.c2{width:16.66%}.c1{width:8.33%}@media(max-width:870px){.row .col{width:100%}}.msg{background:#def;border-left:5px solid #59d;padding:1.5em} 3 | -------------------------------------------------------------------------------- /htdocs/pause/pause.css: -------------------------------------------------------------------------------- 1 | 2 | .actionresponse { 3 | border: 3px #f3f dashed; 4 | padding: 10px; 5 | margin: 2px; 6 | background-color: #eee; 7 | color: black; 8 | } 9 | 10 | .line1, .line2, .line3 { color: black; } 11 | .line1 { background-color: #ffe0e0; } 12 | .line2 { background-color: #e0ffe0; } 13 | .line3 { background-color: #e0e0ff; } 14 | 15 | 16 | .activemenu { background: #bfb; font-size: small; line-height: 1.5; } 17 | .alternate1 { 18 | background: #f8f8f8; 19 | padding-bottom: 12px; 20 | } 21 | .alternate2 { 22 | background: #ddd; 23 | padding-bottom: 12px; 24 | } 25 | .explain { font-size: small; } 26 | .firstheader { margin: 0 0 5%; } 27 | .menuheading { background: white; 28 | font-size: small; } 29 | .menuitem { background: #ddf; font-size: small; line-height: 1.5; } 30 | .menupointer { color: green; } 31 | .messages { text-align: left; border: 2px dashed red; padding: 2ex; } 32 | .statusencr { background: #bfb; 33 | text-align: center; 34 | border: green solid 2px; 35 | font-size: small; } 36 | .statusunencr { background: #fbb; 37 | text-align: center; 38 | border: red solid 2px; 39 | font-size: small; } 40 | .xexplain { font-size: x-small; } 41 | a.activemenu { text-decoration: none; } 42 | a.activemenu:hover { text-decoration: underline; } 43 | a.menuitem { text-decoration: none; } 44 | a.menuitem:hover { text-decoration: underline; } 45 | h4.altering { margin: 0 0 12px; } 46 | p.motd { margin: 10px 1in; padding: 5px; color: black; background: yellow; font-size: small; } 47 | p.versionspecial { margin: 10px 1in; padding: 5px; color: white; background: gray; font-size: small; } 48 | a.versionspecial { color: yellow; } 49 | a.versionspecial:hover { color: red; } 50 | td.activemenu { border: green solid 1px; } 51 | 52 | .texttable { border: black solid 1px; } 53 | 54 | .orange_button { 55 | background:#FF6600 none repeat scroll 0%; 56 | border-color:#FFCC99 rgb(102, 51, 0) rgb(51, 51, 0) rgb(255, 153, 102); 57 | border-style:solid; 58 | border-width:1px; 59 | color:#FFFFFF; 60 | font-family:verdana,sans-serif; 61 | font-size:10px; 62 | font-size-adjust:none; 63 | font-stretch:normal; 64 | font-style:normal; 65 | font-variant:normal; 66 | font-weight:bold; 67 | line-height:normal; 68 | margin:0pt; 69 | padding:0pt 3px; 70 | text-decoration:none; 71 | } 72 | #contentBox { 73 | width:600px; 74 | height:auto; 75 | } 76 | td.administration { 77 | border-top: 2px grey solid; 78 | border-left: 2px grey solid; 79 | } 80 | -------------------------------------------------------------------------------- /htdocs/pause/pause2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/pause2.jpg -------------------------------------------------------------------------------- /htdocs/pause/pause2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/pause2.png -------------------------------------------------------------------------------- /htdocs/pause/pause_favicon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/pause_favicon.jpg -------------------------------------------------------------------------------- /htdocs/pause/valid-xhtml10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/valid-xhtml10.gif -------------------------------------------------------------------------------- /htdocs/pause/valid-xhtml10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/valid-xhtml10.png -------------------------------------------------------------------------------- /htdocs/pause/vcss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/vcss.gif -------------------------------------------------------------------------------- /htdocs/pause/vcss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/htdocs/pause/vcss.png -------------------------------------------------------------------------------- /htdocs/robots.txt: -------------------------------------------------------------------------------- 1 | User-Agent: * 2 | Disallow: /perl-status 3 | Disallow: /status 4 | Disallow: /pub 5 | Disallow: /perl 6 | Disallow: /pause/authenquery 7 | -------------------------------------------------------------------------------- /htdocs/ssl-only/hello.txt: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /lib/PAUSE/Crypt.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | package PAUSE::Crypt; 4 | 5 | use Crypt::URandom 'urandom'; 6 | use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 ); 7 | 8 | sub hash_password { 9 | my ($pw) = @_; 10 | 11 | $pw = substr $pw, 0, 72; 12 | my $hash = bcrypt($pw, '$2a$12$' . en_base64( urandom(16) )); 13 | } 14 | 15 | sub password_verify { 16 | my ($sent_pw, $crypt_pw) = @_; 17 | 18 | if (length $crypt_pw == 13) { 19 | my ($crypt_got) = crypt($sent_pw, $crypt_pw); 20 | return $crypt_got eq $crypt_pw; 21 | } 22 | 23 | my $pw = substr $sent_pw, 0, 72; 24 | my ($crypt_got) = bcrypt($sent_pw, $crypt_pw); 25 | return $crypt_got eq $crypt_pw; 26 | } 27 | 28 | sub maybe_upgrade_stored_hash { 29 | my ($arg) = @_; 30 | 31 | return if $arg->{old_hash} =~ /^\$2a\$/; # already bcrypt 32 | 33 | my $new_hash = hash_password($arg->{password}); 34 | 35 | $arg->{dbh}->do( 36 | "UPDATE usertable SET password=? where user=?", 37 | +{}, 38 | $new_hash, 39 | $arg->{username}, 40 | ); 41 | } 42 | 43 | 1; 44 | -------------------------------------------------------------------------------- /lib/PAUSE/Logger.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | package PAUSE::Logger; 4 | use parent 'Log::Dispatchouli::Global'; 5 | 6 | use Log::Dispatchouli 2.002; 7 | use Time::HiRes (); 8 | 9 | sub logger_globref { 10 | no warnings 'once'; 11 | \*Logger; 12 | } 13 | 14 | sub default_logger_class { 'PAUSE::Logger::_Logger' } 15 | 16 | sub default_logger_args { 17 | return { 18 | ident => "PAUSE-unidentified", 19 | 20 | # to turn on syslogging... 21 | facility => 'daemon', # where "daemon" is whatever syslog facility you want 22 | 23 | to_stderr => $_[0]->default_logger_class->env_value('STDERR') // 0, 24 | to_self => $_[0]->default_logger_class->env_value('TO_SELF') ? 1 : 0, 25 | } 26 | } 27 | 28 | { 29 | package PAUSE::Logger::_Logger; 30 | use parent 'Log::Dispatchouli'; 31 | 32 | sub new { 33 | my ($class, $arg) = @_; 34 | $arg->{file_format} //= sub { 35 | my ($sec, $usec) = Time::HiRes::gettimeofday; 36 | my @time = localtime $sec; 37 | sprintf "%4u-%02u-%02u %02u:%02u:%02u.%04u %s\n", 38 | $time[5]+1900, 39 | $time[4]+1, 40 | @time[3,2,1,0], 41 | int($usec/1000), 42 | $_[0] 43 | }; 44 | 45 | $class->SUPER::new($arg); 46 | } 47 | 48 | sub env_prefix { 'PAUSE_LOG' } 49 | } 50 | 51 | 1; 52 | -------------------------------------------------------------------------------- /lib/PAUSE/MailAddress.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::MailAddress; 2 | use PAUSE (); 3 | use strict; 4 | 5 | # use fields qw(address is_secret) 6 | 7 | sub new { 8 | my($class,$hashref) = @_; 9 | bless $hashref, $class; 10 | } 11 | 12 | sub new_from_userid { 13 | my($class,$userid) = @_; 14 | my $dbh = DBI->connect( 15 | $PAUSE::Config->{AUTHEN_DATA_SOURCE_NAME}, 16 | $PAUSE::Config->{AUTHEN_DATA_SOURCE_USER}, 17 | $PAUSE::Config->{AUTHEN_DATA_SOURCE_PW}, 18 | { RaiseError => 1 } 19 | ) 20 | or Carp::croak(qq{Can't DBI->connect(): $DBI::errstr}); 21 | my $sth = $dbh->prepare("SELECT secretemail 22 | FROM $PAUSE::Config->{AUTHEN_USER_TABLE} 23 | WHERE $PAUSE::Config->{AUTHEN_USER_FLD}=?"); 24 | $sth->execute($userid); 25 | my $me = {}; 26 | my $addr; 27 | if ($sth->rows > 0) { 28 | ($addr) = $sth->fetchrow_array; 29 | } 30 | if ($addr) { 31 | $me->{address} = $addr; 32 | $me->{is_secret} = 1; 33 | } else { 34 | my $dbh = DBI->connect( 35 | $PAUSE::Config->{MOD_DATA_SOURCE_NAME}, 36 | $PAUSE::Config->{MOD_DATA_SOURCE_USER}, 37 | $PAUSE::Config->{MOD_DATA_SOURCE_PW}, 38 | { RaiseError => 1 } 39 | ) 40 | or Carp::croak(qq{Can't DBI->connect(): $DBI::errstr}); 41 | $sth = $dbh->prepare("SELECT email FROM users WHERE userid=?"); 42 | $sth->execute($userid); 43 | if ($sth->rows >= 0){ 44 | ($me->{address}) = $sth->fetchrow_array; 45 | } 46 | $me->{address} ||= "$userid\@cpan.org"; 47 | } 48 | bless $me, $class; 49 | } 50 | 51 | sub address { shift->{address} } 52 | sub is_secret { shift->{is_secret} } 53 | 54 | 1; 55 | -------------------------------------------------------------------------------- /lib/PAUSE/mldistwatch/Constants.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | package PAUSE::mldistwatch::Constants; 4 | 5 | # constants used for index_status: 6 | use constant EDUALOLDER => 50; # pumpkings only 7 | use constant EDUALYOUNGER => 30; # pumpkings only 8 | use constant EDISTNAMEPERM => 26; 9 | use constant EDBERR => 25; 10 | use constant EDBCONFLICT => 23; 11 | use constant EOPENFILE => 21; 12 | use constant EMISSPERM => 20; 13 | use constant ELONGVERSION => 13; 14 | use constant EBADVERSION => 12; 15 | use constant EPARSEVERSION => 10; 16 | use constant ENOMETAFILE => 8; 17 | use constant E_DB_XACTFAIL => 7; 18 | use constant EMETAUNSTABLE => 6; 19 | use constant EBAREPMFILE => 5; 20 | use constant EOLDRELEASE => 4; 21 | use constant EMTIMEFALLING => 3; # deprecated after rev 478 22 | use constant EVERFALLING => 2; 23 | use constant OK => 1; 24 | 25 | our $heading = { 26 | EBADVERSION() => "Version string is not a valid 'lax version' string", 27 | ELONGVERSION() => "Version string exceeds maximum allowed length of 16b", 28 | E_DB_XACTFAIL() => "ERROR: Database error occurred during index update", 29 | EBAREPMFILE() => "Bare .pm files are not indexed", 30 | EDBCONFLICT() => "Conflicting record found in index", 31 | EDBERR() => "Database error", 32 | EDUALOLDER() => "An older dual-life module stays reference", 33 | EDUALYOUNGER() => "Dual-life module stays reference", 34 | EDISTNAMEPERM() => "No permissions for distribution name", 35 | EMISSPERM() => "Permission missing", 36 | EMTIMEFALLING() => "Decreasing mtime on a file (category to be deprecated)", 37 | ENOMETAFILE() => "Distribution included neither META.json nor META.yml", 38 | EOLDRELEASE() => "Release seems outdated", 39 | EOPENFILE() => "Problem while reading the distribtion", 40 | EMETAUNSTABLE() => "META release_status is not stable, will not index", 41 | EPARSEVERSION() => "Version parsing problem", 42 | EVERFALLING() => "Decreasing version number", 43 | OK() => "Successfully indexed", 44 | }; 45 | 46 | sub heading ($) { 47 | my($status) = shift; 48 | # warn "status[$status]"; 49 | $heading->{$status}; 50 | } 51 | 52 | 1; 53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/App/Disabled.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::App::Disabled; 2 | 3 | use Mojo::Base -base; 4 | use Plack::Request; 5 | use Plack::Response; 6 | 7 | sub to_app { 8 | my $self = shift; 9 | 10 | return sub { 11 | my $req = Plack::Request->new(shift); 12 | my $res = $req->new_response(200); 13 | $res->content_type("text/html"); 14 | open my $fh, "/etc/PAUSE.CLOSED"; 15 | local $/; 16 | my $mess = <$fh>; 17 | $mess ||= qq{please retry in a few seconds}; 18 | $res->body([<<"HTML"]); 19 | 20 | 21 | Closed for Maintanance 22 | 23 |

Dear visitor,

}, 24 | $mess, 25 | 26 | HTML 27 | $res->finalize; 28 | }; 29 | } 30 | 31 | 1; 32 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/App/Index.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::App::Index; 2 | 3 | use Mojo::Base -base; 4 | use Plack::Request; 5 | use Plack::Response; 6 | use HTTP::Status qw/:constants/; 7 | 8 | sub to_app { 9 | my $self = shift; 10 | 11 | return sub { 12 | my $req = Plack::Request->new(shift); 13 | my $res = $self->dispatch($req); 14 | return $res if ref $res; 15 | [$res =~ /^\d+$/ ? $res : 500, [], [$res]]; 16 | }; 17 | } 18 | 19 | 20 | sub dispatch { 21 | my ($self, $req) = @_; 22 | 23 | my $method = $req->method; 24 | my $redir_to = $req->base; 25 | my $is_ssl = $req->headers->header("X-pause-is-SSL") || 1; 26 | if ($is_ssl) { 27 | $redir_to->scheme("https"); 28 | } 29 | if ($method eq "GET" && $redir_to->path eq "/" && $req->env->{QUERY_STRING}) { 30 | my $args = $req->env->{QUERY_STRING}; 31 | # warn "Returning SERVER_ERROR: the_request[$the_request]uri[$uri]args[$args]"; 32 | # return SERVER_ERROR; 33 | $redir_to->path("/pause/query"); 34 | $args =~ s|/$||; 35 | $args =~ s|\s.*||; 36 | $redir_to->query($args) if $args; 37 | # warn "Statistics: Redirecting the_request[$the_request]redir_to[$redir_to]"; 38 | my $res = $req->new_response(HTTP_MOVED_PERMANENTLY); 39 | $res->headers->header("Location", $redir_to); 40 | return $res->finalize; 41 | } 42 | 43 | my $uri = $req->path; 44 | #my $host = $r->server->server_hostname; 45 | #my $args = $r->args; 46 | #warn "index-uri[$uri]host[$host]args[$args]"; 47 | return HTTP_NOT_FOUND unless $uri eq "/" || $uri eq "/index.html"; 48 | 49 | #my(%redir) = ( 50 | # "/" => "query", 51 | # "/index.html" => "query?ACTION=pause_05news", 52 | # ); 53 | # $r->internal_redirect_handler("/query"); 54 | $redir_to->path("/pause/query"); 55 | $redir_to->query("ACTION=pause_05news") if $uri eq "/index.html"; 56 | my $res = $req->new_response(HTTP_MOVED_PERMANENTLY); 57 | $res->headers->header("Location", $redir_to); 58 | return $res->finalize; 59 | } 60 | 61 | 1; 62 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Controller/Mlrepr.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Controller::Mlrepr; 2 | 3 | use Mojo::Base "Mojolicious::Controller"; 4 | 5 | sub select_ml_action { 6 | my $c = shift; 7 | my $pause = $c->stash(".pause"); 8 | my $mgr = $c->app->pause; 9 | my $req = $c->req; 10 | 11 | my $dbh = $mgr->connect; 12 | if (my $action = $req->param("ACTIONREQ")) { 13 | if ( 14 | $mgr->config->has_action($action) 15 | && 16 | grep { $_ eq $action } $mgr->config->allow_mlrepr_takeover 17 | ) { 18 | $req->param(ACTION => $action); 19 | $pause->{Action} = $action; 20 | return $c->delegate($action); 21 | } else { 22 | die "cannot or want not action[$action]"; 23 | } 24 | } 25 | 26 | my ($sql, @bind); 27 | if (exists $pause->{UserGroups}{admin}) { 28 | $sql = qq{SELECT users.userid 29 | FROM users, list2user 30 | WHERE isa_list > '' 31 | AND users.userid = list2user.maillistid 32 | ORDER BY users.userid 33 | }; 34 | } else { 35 | $sql = qq{SELECT users.userid 36 | FROM users, list2user 37 | WHERE isa_list > '' 38 | AND users.userid = list2user.maillistid 39 | AND list2user.userid = ? 40 | ORDER BY users.userid 41 | }; 42 | @bind = $pause->{User}{userid}; 43 | } 44 | 45 | my $sth = $dbh->prepare($sql); 46 | $sth->execute(@bind); 47 | my %u; 48 | while (my @row = $mgr->fetchrow($sth, "fetchrow_array")) { 49 | $u{$row[0]} = $row[0]; 50 | } 51 | 52 | my $action_map = $mgr->config->action_map_to_verb($mgr->config->allow_mlrepr_takeover); 53 | my @action_reqs = map {[$action_map->{$_} => $_]} sort keys %$action_map; 54 | $pause->{users} = [sort {lc($u{$a}) cmp lc($u{$b})} keys %u]; 55 | $pause->{action_reqs} = \@action_reqs; 56 | } 57 | 58 | sub show_ml_repr { 59 | my $c = shift; 60 | my $pause = $c->stash(".pause"); 61 | my $mgr = $c->app->pause; 62 | 63 | my $dbh = $mgr->connect; 64 | my $sth = $dbh->prepare("SELECT maillistid, userid 65 | FROM list2user 66 | ORDER BY maillistid, userid"); 67 | $sth->execute; 68 | 69 | my @lists; 70 | while (my $rec = $mgr->fetchrow($sth, "fetchrow_hashref")) { 71 | push @lists, $rec; 72 | } 73 | $sth->finish; 74 | 75 | $pause->{lists} = \@lists; 76 | } 77 | 78 | 1; 79 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Controller/Root.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Controller::Root; 2 | 3 | use Mojo::Base "Mojolicious::Controller"; 4 | 5 | sub check { 6 | my $c = shift; 7 | 8 | if ($c->pause_is_closed) { 9 | my $user = $c->req->env->{REMOTE_USER}; 10 | if ($user and $user eq "ANDK") { 11 | } else { 12 | $c->render("closed"); 13 | return; 14 | } 15 | } 16 | 17 | return 1; 18 | } 19 | 20 | sub index { 21 | my $c = shift; 22 | my $pause = $c->stash(".pause"); 23 | my $mgr = $c->app->pause; 24 | my $req = $c->req; 25 | 26 | return unless exists $pause->{User}; 27 | my $u = $c->active_user_record; 28 | 29 | # Special case for cpan-uploaders that post to the /pause/authenquery without any ACTION 30 | return unless $u->{userid}; 31 | return unless uc $req->method eq 'POST'; 32 | return unless $req->param('SUBMIT_pause99_add_uri_HTTPUPLOAD') || $req->param('SUBMIT_pause99_add_uri_httpupload'); 33 | 34 | my $action = 'add_uri'; 35 | $req->param('ACTION' => $action); 36 | $pause->{Action} = $action; 37 | 38 | # kind of delegate but don't add action to stack 39 | my $routes = $c->app->routes; 40 | my $route = $routes->lookup($action) or die "no route for $action"; 41 | my $to = $route->to; 42 | $routes->_controller($c, $to); 43 | } 44 | 45 | sub auth { 46 | my $c = shift; 47 | return 1; 48 | } 49 | 50 | 1; 51 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Exception.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Exception; 2 | 3 | use Mojo::Base -base; 4 | use overload 5 | '""' => sub {$_[0]->{ERROR} ? $_[0]->{ERROR} : $_[0]->{HTTP_STATUS} ? $_[0]->{HTTP_STATUS} : ""}, 6 | ; 7 | 8 | 9 | 1; 10 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/Delegate.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::Delegate; 2 | 3 | # Mojolicious doesn't have this feature with good intention 4 | # but we need this anyway 5 | 6 | use Mojo::Base "Mojolicious::Plugin"; 7 | 8 | sub register { 9 | my ($self, $app, $conf) = @_; 10 | $app->helper(delegate => \&_delegate); 11 | } 12 | 13 | sub _delegate { 14 | my ($c, $action) = @_; 15 | my $routes = $c->app->routes; 16 | my $route = $routes->lookup($action) or die "no route for $action"; 17 | my $to = $route->to; 18 | push @{$c->match->stack}, $to; 19 | $routes->_controller($c, $to); 20 | return; 21 | } 22 | 23 | 1; 24 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/EditUtils.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::EditUtils; 2 | 3 | # XXX: Should be removed eventually 4 | 5 | use Mojo::Base "Mojolicious::Plugin"; 6 | use ExtUtils::Manifest; 7 | use Cwd (); 8 | 9 | sub register { 10 | my ($self, $app, $conf) = @_; 11 | 12 | $app->helper(manifind => \&_manifind); 13 | } 14 | 15 | sub _manifind { 16 | my $c = shift; 17 | 18 | my $cwd = Cwd::cwd(); 19 | warn "cwd[$cwd]"; 20 | my %files = %{ExtUtils::Manifest::manifind()}; 21 | if (keys %files == 1 && exists $files{""} && $files{""} eq "") { 22 | warn "ALERT: BUG in MANIFIND, falling back to zsh !!!"; 23 | 24 | # This bug was caused by libc upgrade: perl and apache were 25 | # compiled with 2.1.3; upgrading to 2.2.5 and/or later 26 | # recompilation of apache has caused readdir() to return a list of 27 | # empty strings. 28 | 29 | open my $ls, "zsh -c 'ls **/*(.)' |" or die; 30 | %files = map { chomp; $_ => "" } <$ls>; 31 | close $ls; 32 | } 33 | 34 | %files; 35 | } 36 | 37 | 1; 38 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/FixAction.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::FixAction; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use HTTP::Status qw/:constants/; 5 | 6 | # Set hook to convert old ACTION params to router paths 7 | sub register { 8 | my ($self, $app, $conf) = @_; 9 | 10 | $app->hook(before_dispatch => \&_fix); 11 | } 12 | 13 | sub _fix { 14 | my $c = shift; 15 | 16 | _fixup($c); # does what fixup handler did 17 | return if $c->res->is_finished; 18 | 19 | my $action = $c->req->param("ACTION"); 20 | 21 | # Ignore if there's no ACTION or ACTION overrides root 22 | return if !$action or $action eq "root"; 23 | my $path = $c->req->url->path; 24 | $c->req->url->path("$path/$action"); 25 | $c->stash(".pause")->{Action} = $action; 26 | } 27 | 28 | 29 | 30 | =comment 31 | 32 | All Location below /pause share this FixupHandler. All we want to 33 | achieve is that these mappings are in effect: 34 | 35 | /pause redir=> /pause/query CASE 1 36 | /pause/ trans=> /pause/query CASE 2 37 | /pause/query OK CASE 3 38 | /pause/authenquery OK CASE 3 39 | 40 | I have the suspicion that this would be easier with a completely 41 | different approach, but as it works, I do not investigate further now. 42 | =cut 43 | 44 | sub _fixup { 45 | my $c = shift; 46 | my $req = $c->req; 47 | 48 | my $uri = $req->env->{REQUEST_URI}; 49 | my $location = '/pause'; # $r->location; 50 | 51 | # warn "uri[$uri]location[$location] (Question was, does location ever match /query/?)"; 52 | if ($uri eq $location or $uri eq "$location/") { 53 | 54 | # CASE 1/2 55 | 56 | my $redir = $req->url->base; 57 | my $is_ssl = $req->headers->header("X-pause-is-SSL") || 0; 58 | if ($is_ssl) { 59 | $redir->scheme("https"); 60 | } 61 | $redir->path("$location/query"); 62 | $c->res->code(HTTP_MOVED_PERMANENTLY); 63 | $c->res->headers->header("Location",$redir); 64 | # warn "redir[$redir]"; 65 | return $c->res->finish; 66 | } 67 | return unless $uri eq "$location/"; 68 | } 69 | 70 | 1; 71 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/IsPauseClosed.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::IsPauseClosed; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use HTTP::Date (); 5 | use Time::Duration (); 6 | 7 | sub register { 8 | my ($self, $app, $conf) = @_; 9 | 10 | $app->helper(pause_is_closed => \&_check); 11 | } 12 | 13 | sub _check { 14 | my $c = shift; 15 | my $dti = PAUSE::downtimeinfo(); 16 | my $downtime = $dti->{downtime}; 17 | my $willlast = $dti->{willlast}; 18 | my $pause = $c->stash(".pause"); 19 | 20 | if (time < $downtime) { 21 | my $httptime = HTTP::Date::time2str($downtime); 22 | my $delta = $downtime - time; 23 | my $expr = Time::Duration::duration($delta); 24 | my $willlast_dur = Time::Duration::duration($willlast); 25 | $pause->{scheduled_downtime} = { 26 | httptime => $httptime, 27 | delta => $expr, 28 | will_last => $willlast_dur, 29 | }; 30 | } elsif (time >= $downtime && time < $downtime + $willlast) { 31 | my $delta = $downtime + $willlast - time; 32 | my $expr = Time::Duration::duration($delta); 33 | my $willlast_dur = Time::Duration::duration($willlast); 34 | $pause->{closed} = { 35 | delta => $expr, 36 | will_last => $willlast_dur, 37 | }; 38 | } 39 | } 40 | 41 | 1; 42 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/MyURL.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::MyURL; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use Mojo::URL; 5 | 6 | sub register { 7 | my ($self, $app, $conf) = @_; 8 | 9 | # Because we tweak url to pass ACTION param to path, 10 | # we can't use default "url_for" that uses the tweaked path 11 | # to generate a url 12 | $app->helper(my_url => sub { 13 | my $c = shift; 14 | my $url = Mojo::URL->new($c->req->env->{REQUEST_URI}); 15 | my $action = $c->stash('.pause')->{Action}; 16 | my $requested_action = $url->query->param('ACTION') // ''; 17 | $url->query->param(ACTION => $action) if $action && $action ne $requested_action; 18 | $url->query->remove('ABRA'); 19 | $url; 20 | }); 21 | $app->helper(my_full_url => sub { 22 | my $c = shift; 23 | my $url = Mojo::URL->new($c->req->env->{REQUEST_URI})->base($c->req->url->to_abs->base)->to_abs; 24 | $url->query->remove('ABRA'); 25 | $url; 26 | }); 27 | } 28 | 29 | 1; 30 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/RenderYAML.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::RenderYAML; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use YAML::Syck; 5 | use Encode; 6 | 7 | sub register { 8 | my ($self, $app, $conf) = @_; 9 | 10 | $app->helper(render_yaml => sub { 11 | my ($c, $data) = @_; 12 | local $YAML::Syck::ImplicitUnicode = 1; 13 | my $dump = YAML::Syck::Dump($data); 14 | my $edump = Encode::encode_utf8($dump); 15 | my $action = $c->req->param('ACTION') || 'pause'; 16 | $action =~ tr/a-z0-9_//cd; 17 | $c->res->headers->content_disposition("attachment; filename=$action.yaml"); 18 | $c->res->headers->content_type('application/yaml'); 19 | $c->stash(format => "text"); 20 | $c->render(text => $edump); 21 | return; 22 | }); 23 | } 24 | 25 | 1; 26 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/ServePauseDoc.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::ServePauseDoc; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use PAUSE::Web::Util::RewriteXHTML; 5 | use Encode; 6 | 7 | sub register { 8 | my ($self, $app, $conf) = @_; 9 | $app->helper(serve_pause_doc => \&_serve_pause_doc); 10 | } 11 | 12 | 13 | sub _serve_pause_doc { 14 | my ($c, $name, $rewrite) = @_; 15 | 16 | my $home = $c->app->home; 17 | 18 | my $html; 19 | for my $subdir ("htdocs", "pause", "pause/../htdocs", "pause/..", ".") { 20 | my $file = $home->rel_file("$subdir/$name"); 21 | next unless -f $file; 22 | $html = decode_utf8($file->slurp); 23 | if ($name =~ /\.md$/) { 24 | require Text::Markdown::Hoedown; 25 | $html = Text::Markdown::Hoedown::markdown($html); 26 | $html =~ s!(.*?)!qq{$3}!ge; 27 | } 28 | last; 29 | } 30 | 31 | if ($rewrite and !ref $rewrite) { 32 | $html = PAUSE::Web::Util::RewriteXHTML->rewrite($html); 33 | } else { 34 | $html =~ s/^.*?]*>//si; 35 | $html =~ s|.*$||si; 36 | $html = $rewrite->($html) if $rewrite; 37 | } 38 | 39 | $html ||= "document '$name' not found on the server"; 40 | 41 | $c->stash(".pause")->{doc} = $html; 42 | $c->render("pause_doc"); 43 | } 44 | 45 | sub _toc { 46 | my ($num, $text) = @_; 47 | $text = lc $text; 48 | $text =~ s/[^a-z0-9_]+/_/g; 49 | $text =~ s/(^_+|_+$)//g; 50 | $text; 51 | } 52 | 53 | 1; 54 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/TextFormat.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::TextFormat; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use Mojo::ByteStream; 5 | use Text::Format; 6 | 7 | sub register { 8 | my ($self, $app, $conf) = @_; 9 | $app->helper(text_format => \&_text_format); 10 | } 11 | 12 | sub _text_format { 13 | my ($c, $block) = @_; 14 | my $result = $block->(); 15 | Mojo::ByteStream->new(Text::Format->new(firstIndent => 0)->format($result)); 16 | } 17 | 18 | 1; 19 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Plugin/WrapAction.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Plugin::WrapAction; 2 | 3 | use Mojo::Base "Mojolicious::Plugin"; 4 | use HTTP::Status qw/:constants status_message/; 5 | 6 | sub register { 7 | my ($self, $app, $conf) = @_; 8 | 9 | $app->hook(around_dispatch => \&_wrap); 10 | } 11 | 12 | sub _wrap { 13 | my ($next, $c, $action, $last) = @_; 14 | 15 | my $pause = $c->stash(".pause"); 16 | if (!$pause) { 17 | $pause = {}; 18 | $c->stash(".pause", $pause); 19 | } 20 | 21 | my $res = eval { $next->(); }; 22 | if (my $e = $@) { 23 | if (UNIVERSAL::isa($e, "PAUSE::Web::Exception")) { 24 | if ($e->{ERROR}) { 25 | $e->{ERROR} = [ $e->{ERROR} ] unless ref $e->{ERROR} eq 'ARRAY'; 26 | push @{$pause->{ERROR}}, @{$e->{ERROR}}; 27 | require Data::Dumper; 28 | my $message = "Line " . __LINE__ . ", File: " . __FILE__ . "\n" . Data::Dumper->new([$pause->{ERROR}],[qw(error)])->Indent(1)->Useqq(1)->Dump; 29 | $c->app->pause->log({level => 'debug', message => $message}); 30 | $c->res->code($e->{HTTP_STATUS}) if $e->{HTTP_STATUS}; 31 | $c->render('layouts/layout') unless $c->stash('Action'); 32 | } elsif ($e->{HTTP_STATUS}) { 33 | $c->res->headers->content_type('text/plain'); 34 | $c->res->body(status_message($e->{HTTP_STATUS})); 35 | $c->rendered($e->{HTTP_STATUS}); 36 | return; 37 | } 38 | } else { 39 | # this is NOT a known error type, we need to handle it anon 40 | my $error = "$e"; 41 | if ($pause->{ERRORS_TO_BROWSER}) { 42 | push @{$pause->{ERROR}}, " ", $error; 43 | } else { 44 | $c->app->pause->log({level => 'error', message => $error }); 45 | $c->res->code(HTTP_INTERNAL_SERVER_ERROR); 46 | $c->reply->exception($error); 47 | return; 48 | } 49 | } 50 | } 51 | return $res; 52 | } 53 | 54 | 1; 55 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Util/Encode.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Util::Encode; 2 | 3 | # XXX: Should be replaced with plain Encode eventually 4 | 5 | use Mojo::Base; 6 | use Encode; 7 | use HTML::Entities; 8 | use Unicode::String; 9 | 10 | { 11 | our %entity2char = %HTML::Entities::entity2char; 12 | while (my($k,$v) = each %entity2char) { 13 | if ($v =~ /[^\000-\177]/) { 14 | $entity2char{$k} = Unicode::String::latin1($v)->utf8; 15 | # warn "CONV k[$k] v[$v]"; 16 | } else { 17 | delete $entity2char{$k}; 18 | # warn "DEL v[$v]"; 19 | } 20 | } 21 | } 22 | 23 | sub any2utf8 { 24 | my $s = shift; 25 | return $s unless defined $s; 26 | 27 | if ($s =~ /[\200-\377]/) { 28 | # warn "s[$s]"; 29 | my $warn; 30 | local $^W=1; 31 | local($SIG{__WARN__}) = sub { $warn = $_[0]; warn "warn[$warn]" }; 32 | my($us) = Unicode::String::utf8($s); 33 | if ($warn and $warn =~ /utf8|can't/i) { 34 | warn "DEBUG: was not UTF8, we suppose latin1 (apologies to shift-jis et al): s[$s]"; 35 | $s = Unicode::String::latin1($s)->utf8; 36 | warn "DEBUG: Now converted to: s[$s]"; 37 | } else { 38 | warn "seemed to be utf-8"; 39 | } 40 | } 41 | $s = _decode_highbit_entities($s); # modifies in-place 42 | Encode::_utf8_on($s); 43 | $s; 44 | } 45 | 46 | sub _decode_highbit_entities { 47 | my $s = shift; 48 | # warn "s[$s]"; 49 | my $c; 50 | use utf8; 51 | for ($s) { 52 | s{ ( & \# (\d+) ;? ) 53 | }{ ($2 > 127) ? chr($2) : $1 54 | }xeg; 55 | 56 | s{ ( & \# [xX] ([0-9a-fA-F]+) ;? ) 57 | }{$c = hex($2); $c > 127 ? chr($c) : $1 58 | }xeg; 59 | 60 | s{ ( & (\w+) ;? ) 61 | }{my $r = $entity2char{$2} || $1; warn "r[$r]2[$2]"; $r; 62 | }xeg; 63 | 64 | } 65 | # warn "s[$s]"; 66 | $s; 67 | } 68 | 69 | 1; 70 | -------------------------------------------------------------------------------- /lib/pause_2017/PAUSE/Web/Util/RewriteXHTML.pm: -------------------------------------------------------------------------------- 1 | package PAUSE::Web::Util::RewriteXHTML; 2 | 3 | # XXX: Should be rewritten to use HTML5 eventually 4 | 5 | use Mojo::Base; 6 | use XML::SAX::ParserFactory; 7 | use XML::SAX::Writer; 8 | use XML::LibXML::SAX; 9 | $XML::SAX::ParserPackage = "XML::LibXML::SAX"; 10 | 11 | sub rewrite { 12 | my ($self, $html) = @_; 13 | 14 | my $w = XML::SAX::Writer->new(Output => \@out); 15 | my $f = PAUSE::Web::Util::RewriteXHTML::Filter->new(Handler => $w); 16 | my $p = XML::SAX::ParserFactory->parser(Handler => $f); 17 | $p->parse_string($html); 18 | while ($out[0] =~ /^<[\?\!]/){ # remove XML Declaration, DOCTYPE 19 | shift @out; 20 | } 21 | join "", @out; 22 | } 23 | 24 | 25 | 26 | package PAUSE::Web::Util::RewriteXHTML::Filter; 27 | 28 | use Mojo::Base "XML::SAX::Base"; 29 | 30 | sub start_element { 31 | my ($self, $prop) = @_; 32 | if ($prop->{Name} eq "body") { 33 | $self->{InBody}++; 34 | return; 35 | } 36 | return unless $self->{InBody}; 37 | if ($prop->{Name} eq "a") { 38 | my $href; 39 | 40 | $href = $prop->{Attributes}{"{}href"}{Value} if 41 | $prop->{Attributes} && 42 | $prop->{Attributes}{"{}href"} && 43 | $prop->{Attributes}{"{}href"}{Value}; 44 | 45 | if (0) { 46 | } elsif (!$href) { 47 | # anchor 48 | } elsif ($href =~ m{ ^ (?:ftp|http|https) : // }x ) { 49 | # absolute 50 | } elsif ($href =~ m{ ^ (?:mailto) : }x ) { 51 | # absolute 52 | } elsif ($href =~ m{^\#}) { 53 | # anchor 54 | } else { 55 | $prop->{Attributes}{"{}href"}{Value} =~ s{^}{http://www.cpan.org/modules/}; 56 | } 57 | } 58 | 59 | $self->SUPER::start_element($prop); 60 | } 61 | 62 | sub end_element { 63 | my ($self, $prop) = @_; 64 | if ($prop->{Name} eq "body") { 65 | $self->{InBody}--; 66 | return; 67 | } 68 | return unless $self->{InBody}; 69 | $self->SUPER::end_element($prop); 70 | } 71 | 72 | sub characters { 73 | my ($self, $prop) = @_; 74 | return unless $self->{InBody}; 75 | $self->SUPER::characters($prop); 76 | } 77 | 78 | sub doctype_decl { return; } 79 | 80 | sub processing_instruction { return; } 81 | 82 | 1; 83 | -------------------------------------------------------------------------------- /lib/pause_2017/TODO: -------------------------------------------------------------------------------- 1 | Things I hope to have done at PTS and afterwards: 2 | 3 | - Write more tests, especially using latin-1 (and Asian/Emoji) characters 4 | - Replace "require ..." with "use ..." to preload 5 | - Move lib/pause_2017/t/ directory into t/ when tests are ready for travis.ci 6 | - Wrap <%= %> stuff with to make them easier to find/test (by Mech/Web::Scraper etc) 7 | - Port spurious warn and print STDERR to ->log(level => "debug", ...) 8 | - Replace YAML::Syck with something else 9 | - Kill PAUSE::Web::Exception where appropriate, most of which can be replaced with return + $pause->{some_flags} + template blocks 10 | - Add csrf_token where necessary (add_uri shouldn't have it yet, and some other pages too, or at least without prior discussion because some people use scripts to modify their PAUSE data) 11 | - Consider removing/replacing some plugins 12 | - Replace XHTML with HTML5 if time permits, to remove a dirty hack on TagHelpers 13 | - Incorporate fixes that have been merged to Andreas' master 14 | 15 | - Drop HTTP support 16 | - Remove modulelist related stuff 17 | 18 | Things that'll take more time to address (to avoid double encoding etc): 19 | 20 | - Replace PAUSE::Web::Util::Encode with plain Encode 21 | - Replace $mgr->fetchrow with $sth->fetchrow_* 22 | - PAUSE seems to have data that don't work with newer MySQL (because of stricter datetime format etc) 23 | 24 | Things that need discussion 25 | 26 | - It would be nice if we can directly use some of the paused/mldistwatch features in the web UI tests 27 | - Pagers and table sorters, to make frequent uploaders (probably) happy => as long as javascript is not used (Andreas' strong preference) 28 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/_closed.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % my $closed = $pause->{closed}; 3 |

PAUSE is closed for maintainance for about <%= $closed->{will_last} %>. Estimated time of opening is in <%= $closed->{delta} %>.

Sorry for the inconvenience and Thanks for your patience.

4 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/_user_menu.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % my $user = $pause->{User} || {}; 3 | % my $user_groups = $pause->{UserGroups} || {}; 4 | % my $is_public = $c->req->url->path =~ /^query/ ? 1 : 0; 5 | % my @offer_groups = app->pause->config->public_groups; 6 | % $pause->{Action} ||= "menu"; 7 | % if (%$user) { 8 | % unshift @offer_groups, "user"; 9 | % for my $group (app->pause->config->extra_groups) { 10 | % push @offer_groups, $group if exists $user_groups->{$group} || exists $user_groups->{admin}; 11 | % } 12 | % } 13 | 47 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/_user_status.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % my $remote_user = $c->req->env->{REMOTE_USER}; 3 | % if ($remote_user and $remote_user ne "-") { 4 | % my $user = $pause->{User}; 5 | % my $status_class = $pause->{is_ssl} ? "statusencr" : "statusunencr"; 6 | % my $email = $user->{secretemail} || $user->{email} || "No email???"; 7 | % my $hidden_user = $pause->{HiddenUser}; 8 | % my $hidden_user_email = $hidden_user->{secretemail} || $hidden_user->{email} || "No email???"; 9 |
10 | <%= $remote_user %> <>
11 | % if ($hidden_user and $user and $hidden_user->{userid} and $user->{userid} and $hidden_user->{userid} ne $user->{userid}) { 12 | acting as <%= $hidden_user->{userid} %> <<%= $hidden_user_email %>>
13 | % } 14 | 15 | % if ($pause->{is_ssl}) { 16 | encrypted session 17 | % } else { 18 | unencrypted session 19 | % } 20 | 21 |
22 | % } 23 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/admin/change_user_status.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | 5 | 6 | % if ($pause->{user_not_found}) { 7 |
8 |

User <%= $pause->{user} %> is not found.

9 |
10 | % } elsif ($pause->{changed}) { 11 |
12 |

<%= $pause->{user} %>'s status has changed from <%= $pause->{ustatus} %> to <%= $pause->{new_ustatus} %>.

13 |
14 | % } 15 | 16 | %= csrf_field 17 | %= text_field "pause99_change_user_status_user" => $pause->{user}; 18 | %= select_field "pause99_change_user_status_new_ustatus" => ['nologin', 'active']; 19 | %= submit_button "Change", name => "pause99_change_user_status_sub"; 20 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/admin/email_for_admin.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |

Query a combination of usertable table and user for public or private emails according to the preferences

5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | % for (@{$pause->{list} || []}) { 17 | 18 | 19 | 20 | 21 | % } 22 | 23 |
idid@cpan.org gets forwarded to
<%= $_->{id} %>
24 | 25 |

"YAML") %>" style="text-decoration: none;">YAML 26 |

27 |
28 | % content_for javascript => begin 29 | %= javascript "/list.min.js" 30 | %= javascript begin 31 | var List = new List('emails', { 32 | valueNames: ['userid', 'email'] 33 | }); 34 | % end 35 | % end 36 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/admin/manage_id/manage.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | % my %ALL = %{$pause->{all} || {}}; 4 | % my $json_encoder = JSON::XS->new->indent->canonical; 5 | 6 |

View all pending applications for new user IDs and for modules registrations

7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | % for my $k (sort { $ALL{$b}{type} cmp $ALL{$a}{type} || $ALL{$b}{mtime} <=> $ALL{$a}{mtime} } keys %ALL) { 22 | 23 | 24 | 25 | 26 | 31 | 44 | 45 | % } 46 | 47 |
TypeUseridTimeRaw SessionActions
<%= $ALL{$k}{type} %><%= $ALL{$k}{session}{APPLY}{userid} %><%= POSIX::strftime("%FT%TZ", gmtime $ALL{$k}{mtime}) %>
<%= do {
27 |         my $json = $json_encoder->encode($ALL{$k}{session});
28 |         $json =~ s/\\n/\n/g;
29 |         $json;
30 |       } %>
32 | $ALL{$k}{session}{_session_id}, 35 | (exists $ALL{$k}{session}{APPLY}{fullname} ? "SUBMIT_pause99_add_user_sub" : "SUBMIT_pause99_add_mod_preview") => 1 36 | ) %>">Go To Registration 37 |
38 | "delete", 41 | USERID => $ALL{$k}{session}{_session_id}, 42 | ) %>">Delete Registration 43 |
48 |
49 | % content_for javascript => begin 50 | %= javascript "/list.min.js" 51 | %= javascript begin 52 | var requestList = new List('requests', {valueNames: ['type', 'userid', 'session']}); 53 | % end 54 | % end 55 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/admin/select_user.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | <%= select_field "HIDDENNAME" => $pause->{hidden_name_list}, 5 | size => 10, 6 | =%> 7 | 8 |
9 | 10 | <%= select_field "ACTIONREQ" => $pause->{action_req_list}, 11 | size => 13, 12 | =%> 13 | 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/closed.html.ep: -------------------------------------------------------------------------------- 1 | PAUSE CLOSED 2 | 3 |

Closed for Maintainance

4 | %= include '_closed'; 5 |

Andreas Koenig

6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/disabled.html.ep: -------------------------------------------------------------------------------- 1 | % layouts 'layout', title => "Closed for Maintenance"; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |

Dear visitor,

5 | %== $pause->{message}; 6 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/admin/change_user_status.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Record update in the PAUSE users database: 6 | 7 | The ustatus of <%= $pause->{user} %> has changed from <%= $pause->{ustatus} %> to <%= $pause->{new_ustatus} %>. 8 | 9 | Data entered by <%= $pause->{User}{fullname} %>. 10 | 11 | Thanks, 12 | -- 13 | The PAUSE Team 14 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/admin/edit_ml.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Record update in the PAUSE mailinglists database: 6 | 7 | <%== sprintf "%12s: [%s]", "userid", $pause->{selected}{maillistid} %> 8 | % for my $field (qw(maillistname address subscribe)) { 9 | % my $fieldname = "pause99_edit_ml_$field"; 10 | % my $param = param($fieldname); 11 | % if ($param ne $pause->{selected}{$field}) { 12 | <%== sprintf "%12s: [%s]", $field, $param %> was [<%== $pause->{selected}{$field} %>] 13 | % } else { 14 | <%== sprintf "%12s: [%s]", $field, $pause->{selected}{$field} %> 15 | % } 16 | % } 17 | % if ($pause->{changed}) { 18 | 19 | Data entered by <%= $pause->{User}{fullname} %>. 20 | Please check if they are correct. 21 | 22 | Thanks, 23 | -- 24 | The PAUSE Team 25 | % } 26 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/admin/user/onetime_password.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | 6 | (This mail has been generated automatically by the Perl Authors Upload 7 | Server on behalf of the admin <%== $PAUSE::Config->{ADMIN} %>) 8 | 9 | As already described in a separate message, you're a registered Perl 10 | Author with the userid <%== $pause->{userid} %>. For the sake of approval I have 11 | assigned to you a change-password-only-password that enables 12 | you to pick your own password. This password is "<%== $pause->{onetime} %>" 13 | (without the enclosing quotes). Please visit 14 | 15 | <%== my_full_url->path("/pause/authenquery")->query(ACTION => "change_passwd")->scheme("https") %> 16 | 17 | and use this password to initialize your account in the authentication 18 | database. Once you have entered your password there, your one-time 19 | password is expired automatically. If you cannot connect to the above 20 | URL, you can replace 'https' with 'http', but then you are not using 21 | SSL encryption. Be careful to always use an SSL connection if 22 | possible, otherwise your password can be intercepted by third parties. 23 | 24 | Thanks & Regards, 25 | -- 26 | <%== $PAUSE::Config->{ADMIN} %> 27 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/admin/user/welcome_ml.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Mailing list entered by 6 | <%== $pause->{User}{fullname} %>: 7 | 8 | Userid: <%== $pause->{userid} %> 9 | Name: <%== $pause->{maillistname} %> 10 | Description: 11 | %= text_format begin 12 | <%== $pause->{subscribe} %> 13 | % end 14 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/admin/user/welcome_user.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Welcome <%== $pause->{fullname} %>, 6 | 7 | PAUSE, the Perl Authors Upload Server, has a userid for you: 8 | 9 | <%== $pause->{userid} %> 10 | 11 | Once you've gone through the procedure of password approval (see the 12 | separate mail you should receive about right now), this userid will be 13 | the one that you can use to upload your work or edit your credentials 14 | in the PAUSE database. 15 | 16 | This is what we have stored in the database now: 17 | 18 | Name: <%== $pause->{fullname} // '' %> 19 | email: <%== $pause->{email} // '' %> 20 | homepage: <%== $pause->{homepage} // '' %> 21 | 22 | Please note that your email address is exposed in various listings and 23 | database dumps. You can register with both a public and a secret email 24 | if you want to protect yourself from SPAM. If you want to do this, 25 | please visit 26 | <%== my_full_url->path("/pause/authenquery")->query(ACTION => "edit_cred" )->scheme("https") %> 27 | or 28 | <%== my_full_url->path("/pause/authenquery")->query(ACTION => "edit_cred" )->scheme("http") %> 29 | 30 | If you need any further information, please visit 31 | $CPAN/modules/04pause.html. 32 | If this doesn't answer your questions, contact modules@perl.org. 33 | 34 | Thank you for your prospective contributions, 35 | The PAUSE Team 36 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/public/mailpw.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | 6 | (this an automatic mail sent by a program because somebody asked for 7 | it. If you did not intend to get it, please let us know and we will 8 | take more precautions to prevent abuse.) 9 | 10 | Somebody, probably you, has visited the URL 11 | 12 | <%== my_full_url->query(ACTION => "mailpw") %> 13 | 14 | and asked that you, "<%= $pause->{mailpw_userid} %>", should get a token that enables the 15 | setting of a new password. Here it is (please watch out for line 16 | wrapping errors of your mail reader and other cut and paste errors, 17 | this URL must not contain any spaces): 18 | 19 | <%== my_full_url->path("/pause/query")->query(ACTION => "change_passwd", ABRA => "$pause->{mailpw_userid}.$pause->{passwd}")->scheme("https") %> 20 | 21 | Please visit this URL, it should open you the door to a password 22 | changer that lets you set a new password for yourself. This token 23 | will expire within a few hours. If you don't need it, do nothing. By 24 | the way, your old password is still valid. 25 | 26 | Thanks, 27 | -- 28 | The PAUSE Team 29 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/public/request_id.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Request to register new user 6 | 7 | fullname: <%== $pause->{fullname} %> 8 | userid: <%== $pause->{userid} %> 9 | mail: CENSORED 10 | homepage: <%== $pause->{homepage} %> 11 | why: 12 | <%== $pause->{rationale} %> 13 | 14 | The following links are only valid for PAUSE maintainers: 15 | 16 | Registration form with editing capabilities: 17 | <%== my_full_url->path("/pause/authenquery")->scheme('https')->query( 18 | ACTION => "add_user", 19 | USERID => $pause->{session_id}, 20 | SUBMIT_pause99_add_user_sub => 1) %> 21 | Immediate (one click) registration: 22 | <%== my_full_url->path("/pause/authenquery")->scheme('https')->query( 23 | ACTION => "add_user", 24 | USERID => $pause->{session_id}, 25 | SUBMIT_pause99_add_user_Definitely => 1 ) %> 26 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/change_passwd.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Password update on PAUSE: 6 | 7 | <%== $pause->{User}{userid} %> (<%== $pause->{User}{fullname} || "fullname N/A" %>) visited the 8 | password changer on PAUSE at <%== scalar gmtime %> UTC 9 | and changed the password for <%== $pause->{HiddenUser}{userid} %> (<%== $pause->{HiddenUser}{fullname} || "fullname N/A" %>). 10 | 11 | No action is required, but it would be a good idea if somebody 12 | would check the correctness of the new password. 13 | 14 | Thanks, 15 | The PAUSE Team 16 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/cred/edit.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | Record update in the PAUSE users database: 6 | 7 | <%== sprintf "%11s: [%s]", "userid", $pause->{HiddenUser}{userid} %> 8 | 9 | % for (@{$pause->{mailblurb}}) { 10 | <%== sprintf "%11s: [%s]", $_->{field}, $_->{value} %><%== ($_->{was}) ? " was [$_->{was}]" : "" %> 11 | 12 | % } 13 | 14 | Data were entered by <%== $pause->{User}{userid} %> (<%== $pause->{User}{fullname} %>). 15 | Please check if they are correct. 16 | 17 | Thanks, 18 | The PAUSE Team 19 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/delete_files.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | %= text_format begin 6 | According to a request entered by <%== $pause->{User}{fullname} %> the 7 | following files and the symlinks pointing to them have been scheduled 8 | for deletion. They will expire after 72 hours and then be deleted by a 9 | cronjob. Until then you can undelete them via 10 | <%== my_full_url->path("/pause/authenquery")->query(ACTION => "delete_files")->scheme("https") %> or 11 | <%== my_full_url->path("/pause/authenquery")->query(ACTION => "delete_files")->scheme("http") %> 12 | % end 13 | 14 | <%== $pause->{blurb} %> 15 | 16 | %= text_format begin 17 | Note: to encourage deletions, all of past CPAN 18 | glory is collected on http://history.perl.org/backpan/ 19 | % end 20 | 21 | The PAUSE Team 22 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/edit_uris.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | % #----------------------------------------------------------------- 4 | % 5 | Record update in the PAUSE uploads database: 6 | 7 | % if ($pause->{selected}) { 8 | <%== sprintf("%12s: [%s]", "uriid", $pause->{selected}{uriid} %> 9 | % for my $field (qw( 10 | % uri 11 | % nosuccesstime 12 | % nosuccesscount 13 | % changed 14 | % changedby 15 | % )) { 16 | % my $fieldname = "pause99_edit_uris_$field"; 17 | % my $param = param($fieldname); 18 | % if ($param ne $pause->{selected}{$field}) { 19 | <%== sprintf("%12s: [%s]", $field, $param) %> was [<%= $pause->{selected}{$field} %>] 20 | % } else { 21 | <%== sprintf("%12s: [%s]", $field, $pause->{selected}{$field} %> 22 | % } 23 | % } 24 | % if ($pause->{changed}) { 25 | 26 | Data entered by <%== $pause->{User}{fullname} %> (<%== $pause->{User}{userid} %>). 27 | Please check if they are correct. 28 | 29 | Thanks, 30 | -- 31 | The PAUSE Team 32 | % } 33 | % } 34 | 35 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/reindex.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | According to a request entered by <%== $pause->{User}{fullname} %> the 6 | following files have been scheduled for reindexing. 7 | 8 | <%== $pause->{blurb} %> 9 | 10 | Estimated time of job completion: <%== $pause->{eta} %> 11 | 12 | Thanks, 13 | -- 14 | The PAUSE Team 15 | 16 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/reset_version.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | According to a request by <%== $pause->{User}{fullname} %> the following 6 | packages have their recorded version set to 'undef'. 7 | 8 | <%== $pause->{blurb} %> 9 | 10 | Thanks, 11 | -- 12 | The PAUSE Team 13 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/email/user/uri/submission.email.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | % 3 | %#------------------------------------------------------------------ 4 | % 5 | %= text_format begin 6 | <%== $pause->{User}{userid} %> (<%== $pause->{User}{fullname} %>) visited the PAUSE and requested an upload 7 | into <%== $pause->{whose} %> directory. The request used the following parameters:} 8 | 9 | % end 10 | % for (@{$pause->{mb} || []}) { 11 | <%== sprintf qq{ %-*s [%s]}, $pause->{longest}, $_->[0], $_->[1] %> 12 | % } 13 | 14 | % if ($pause->{query_succeeded}) { 15 | %= text_format begin 16 | The request is now entered into the database where the PAUSE daemon 17 | will pick it up as soon as possible (usually 1-2 minutes). 18 | 19 | 20 | During upload you can watch the logfile in <%== $pause->{tailurl} %>. 21 | 22 | You'll be notified as soon as the upload has succeeded, and if the 23 | uploaded package contains modules, you'll get another notification 24 | from the indexer a little later (usually within 1 hour). 25 | % end 26 | % } 27 | 28 | Thanks for your contribution, 29 | -- 30 | The PAUSE Team 31 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/mlrepr/select_ml_action.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |

5 | Mailinglist support is intended to be available on a 6 | delegates/representatives basis, that means, one or more users 7 | are "elected" (no formal election though) to be allowed to act 8 | on behalf of a mailing list. There is no password for a mailing 9 | list, there are no user credentials for a mailing list. There 10 | are no uploads for mailing lists, thus no deletes or repairs of 11 | uploads. 12 |

13 |

14 | There are only the infos about the mailing list 15 | editable via the method edit_ml and ther are a number of 16 | modules associated with a mailing list and these are accessible 17 | in the edit_mod method. 18 |

19 |

20 | The menu item Select 21 | Mailinglist/Action lets you access the available methods and 22 | the mailing lists you are associated with. Only people elected 23 | as a representative of a mailing list should be able to ever see 24 | the menu entry.

This feature is available since Oct 25th, 25 | 1999 and hardly tested, so please take care and let us know how 26 | it goes. 27 |

28 | 29 |

Choose your mailing list and the action and click the submit 30 | button.

31 | 32 | <%= select_field HIDDENNAME => [ 33 | map { 34 | $_ eq $pause->{User}{userid} 35 | ? [$_ => $_, selected => "selected"] 36 | : $_ 37 | } @{$pause->{users}} 38 | ], size => (@{$pause->{users}} > 18 ? 15 : scalar @{$pause->{users}}), 39 | %> 40 | <%= select_field ACTIONREQ => $pause->{action_reqs}, 41 | size => (@{$pause->{action_reqs}} > 18 ? 15 : scalar @{$pause->{action_reqs}}), 42 | %> 43 | 44 | 45 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/mlrepr/show_ml_repr.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |

These are the contents of the table list2user. 5 | There's currently no way to edit the table except 6 | direct SQL. The table says who is representative of a 7 | mailing list.

8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | % for my $rec (@{$pause->{lists} || []}) { 19 | 20 | 21 | 22 | 23 | % } 24 | 25 |
Mailing listUser-ID
<%= $rec->{maillistid} %><%= $rec->{userid} %>
26 |
27 | % content_for javascript => begin 28 | %= javascript "/list.min.js" 29 | %= javascript begin 30 | var userList = new List('users', {valueNames: ['ml', 'userid']}); 31 | % end 32 | % end 33 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/pause_doc.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | %== $pause->{doc} 5 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/public/admin.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |

Registered admins: <%= join ", ", @{$pause->{admins} || []} %>

5 |

"YAML") %>" style="text-decoration: none;"> 6 | YAML 7 |

8 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/public/mailpw.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | %= csrf_field 4 | 5 | "> 6 | 7 | % if ($pause->{mailpw_userid}) { 8 | % if ($pause->{valid_email}) { 9 |

A token to change the password for <%= $pause->{mailpw_userid} %> is on its way to its owner. Should the mail not arrive, please tell us.

10 | % } else { 11 |

We have not found the email of <%= $pause->{mailpw_user_id} %>. Please try with a different name or mail to the administrator directly.

12 | % } 13 | % } 14 | 15 |

This form lets you request a token that enables you to set a new 16 | password. It only operates correctly if the database knows you and 17 | your email adress. Please fill in your userid on the CPAN. The token 18 | will be mailed to that userid.

19 | 20 | <%= text_field "pause99_mailpw_1", size => 32 %> 21 | 22 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/public/pumpkin.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |

Registered pumpkins: <%= join ", ", @{$pause->{pumpkins} || []} %>

5 |

"YAML") %>" style="text-decoration: none;"> 6 | YAML 7 |

8 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/public/request_id/request.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | % if (@{$pause->{errors} || []}) { 5 |

Error processing form

6 | % for (@{$pause->{errors}}) { 7 |
  • <%= $_ %>
8 | % } 9 |

Please retry.

10 | % } 11 | 12 | % if ($pause->{showform}) { 13 | 14 | %= include "public/request_id/_form"; 15 | 16 | % } 17 | % if ($pause->{reg_ok}) { 18 | % if ($pause->{recaptcha_enabled}) { 19 | % if ($pause->{added_user}) { 20 |

New user creation succeeded.

21 | 22 |

LOOK FOR AN EMAIL WITH YOUR TEMPORARY PASSWORD.

23 | 24 |

You'll also receive a welcome email like the one below.

25 | 26 | 32 |
33 | % } else { 34 |

New user creation failed.

35 | % } 36 | % } 37 | % elsif ($pause->{blurbcopy}) { 38 | Sending mail to: <%= $pause->{send_to} %> 39 | 45 |
46 | 47 | % } 48 | % } 49 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/root/index.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | % my $mgr = $c->app->pause; 4 | % if ($pause->{User}{fullname}) { 5 |

Hi <%= $pause->{User}{fullname} %>,
please choose an action from the menu.

6 | % } else { 7 |

Please choose an action from the menu.

8 | % } 9 | 10 |

The usermenu to the left shows all menus available to 11 | you, the table below shows descriptions for all menues available 12 | to anybody on PAUSE.

13 | 14 | % my $alter = 1; 15 | 16 | 32 |
17 | 18 | 19 | % for my $group ($mgr->config->all_groups) { 20 | % my @names = $mgr->config->action_names_for($group); 21 | % for my $action ($mgr->config->sort_allowed_group_actions($group, \@names)) { 22 | % next if defined $action->{display} and !$action->{display}; 23 | 24 | 25 | 26 | 27 | 28 | % } 29 | % } 30 |
ActionGroupDescription
<%= $action->{verb} %><%= b($action->{priv} || "N/A") %><%= b($action->{desc} || "N/A") %>
31 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/change_passwd.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | 5 | 6 |

Changing Password of <%= $pause->{HiddenUser}{userid} %>

7 | % if (param("ABRA")) { 8 | "> 9 | % } 10 | 11 | % if ($pause->{password_stored}) { 12 |

New password stored and enabled. Be prepared that 13 | you will be asked for a new authentication on the next request. If 14 | this doesn't work out, it may be that you have to restart the 15 | browser.

16 | % } else { 17 | % if ( $pause->{UserSecrets}{forcechange} ) { 18 | 19 |

Your password in the database is tainted which 20 | means you have to renew it. If you believe this is wrong, please 21 | complain, it's always possible that you are seeing a bug.

22 | 23 | % } 24 | 25 |

Please fill in your new password in both textboxes. 26 | Only if both fields contain the same password, we will be able to 27 | proceed.

28 | 29 | <%= password_field "pause99_change_passwd_pw1", 30 | maxlength => 72, 31 | size => 16, 32 | =%> 33 | 34 | <%= password_field "pause99_change_passwd_pw2", 35 | maxlength => 72, 36 | size => 16, 37 | =%> 38 | 39 | %= csrf_field 40 | 41 | 42 | % } 43 | 44 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/distperms/giveup_dist_comaint.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | 5 | 6 | % if (param("SUBMIT_pause99_giveup_dist_comaint")) { 7 |
8 | % if ($pause->{error}) { 9 |

<%= $pause->{error} %>

10 | % } elsif (@{$pause->{results} || []}) { 11 |
    12 | % for (@{$pause->{results}}) { 13 | % if ($_->{error}) { 14 |
  • Error trying to remove <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %> (<%= $_->{dist} %>): <%= $_->{error} %>
  • 15 | % } else { 16 |
  • Removed <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %> (<%= $_->{dist} %>).
  • 17 | % } 18 | % } 19 |
20 | % } else { 21 |

You need to select one or more distributions. Nothing done.

22 | % } 23 |
24 |
25 | % } 26 | 27 | % if (@{$pause->{dists} || []}) { 28 |

Give up co-maintainer status

29 |

Please select one or 30 | more distributions for which you want to be removed from 31 | the co-maintainer table and press Give Up

32 | 33 |

If you need finer control (eg. to give up comaintainership 34 | for a removed module), visit 35 | 36 | Give up Co-maintainership status per module page.

37 | 38 |

Select one or more distributions:

39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | % for (@{$pause->{dists}}) { 52 | 53 | 54 | 55 | 56 | 57 | % } 58 | 59 |
DistributionOwners
<%= check_box "pause99_giveup_dist_comaint_d" => $_->[0] %><%= $_->[0] %><% if ($_->[1] =~ /,/) { %> (incomplete ownership)<% } %><%= $_->[1] %>
60 |

61 |

63 |
64 | % content_for javascript => begin 65 | %= javascript "/list.min.js" 66 | %= javascript begin 67 | var List = new List('dists', { 68 | valueNames: ['dist','owners'] 69 | }); 70 | % end 71 | % end 72 | 73 | % } else { 74 |

Sorry, <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %> does not seem to be co-maintainer of any distribution.

75 | % } 76 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/files/delete.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | % my $files = $pause->{files} || {}; 4 | 5 | 6 |

Files in directory authors/id/<%= $pause->{userhome} %>

7 | 8 | % if (%$files) { 9 | % if ($pause->{deleting_indexed_files}) { 10 |
11 |

You are deleting one or more files that appear in the CPAN index.

12 |
13 | % } else { 14 |
15 |

If you delete files marked with [indexed], the CPAN index will be affected.

16 |
17 | % } 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | % for my $file (sort keys %$files) { 31 | 32 | 33 | % if ($files->{$file}{indexed}) { 34 | 35 | % } else { 36 | 37 | % } 38 | 39 | 40 | 41 | % } 42 | 43 |
FileSizeModified
<%= check_box "pause99_delete_files_FILE" => $file %><%= $file %> [indexed]<%= $file %><%= $files->{$file}{stat} %><%= $files->{$file}{blurb} %>
44 | 45 |

46 |
47 | % content_for javascript => begin 48 | %= javascript "/list.min.js" 49 | %= javascript begin 50 | var List = new List('files', { 51 | valueNames: ['file', 'size', 'modified'] 52 | }); 53 | % end 54 | % end 55 | 56 | % } else { 57 | No files found in authors/id/<%= $pause->{userhome} %> 58 | % } 59 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/files/show.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | % my $files = $pause->{files} || {}; 4 | 5 |

Files in directory authors/id/<%= $pause->{userhome} %>

6 | % if (%$files) { 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | % for my $file (sort keys %$files) { 19 | 20 | % if ($files->{$file}{indexed}) { 21 | 22 | % } else { 23 | 24 | % } 25 | 26 | 27 | 28 | % } 29 | 30 |
FileSizeModified
<%= $file %> [indexed]<%= $file %><%= $files->{$file}{stat} %><%= $files->{$file}{blurb} %>
31 |
32 | % content_for javascript => begin 33 | %= javascript "/list.min.js" 34 | %= javascript begin 35 | var List = new List('files', { 36 | valueNames: ['file', 'size', 'modified'] 37 | }); 38 | % end 39 | % end 40 | 41 | % } else { 42 | No files found in authors/id/<%= $pause->{userhome} %> 43 | % } 44 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/perms/_share_makeco.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | 3 | % if (param("SUBMIT_pause99_share_perms_makeco")) { 4 |
5 | % if ($pause->{error}) { 6 |

<%= $pause->{error} %>

7 | % } elsif (@{$pause->{results} || []}) { 8 | % for (@{$pause->{results}}) { 9 | % if ($_->{error}) { 10 |

Error trying to add <%= $_->{user} %> to co-maintainers of <%= $_->{mod} %>: <%= $_->{error} %>

11 | % } elsif ($_->{duplicated}) { 12 |

<%= $_->{user} %> was already a co-maintainer of <%= $_->{mod} %>: skipping

13 | 14 | % } else { 15 |

Added <%= $_->{user} %> to co-maintainers of <%= $_->{mod} %>.

16 | % } 17 | % } 18 | % } else { 19 |

You need to select one or more packages and enter a userid. 20 | Nothing done.

21 | % } 22 |
23 |
24 | % } 25 | 26 | % if (@{$pause->{mods} || []}) { 27 | 28 |

Select a co-maintainer

29 |

Please select one or 30 | more namespaces for which you want to select a 31 | co-maintainer, enter the CPAN userid of the co-maintainer 32 | into the text field and press Make Co-Maintainer

33 | 34 |

If you are open to someone else asking for your first-come 35 | permissions, but you wish to decide on any such request, you 36 | can give a co-maint to a special user called 37 | HANDOFF.

38 | 39 |

You can also grant co-maint to 40 | NEEDHELP 41 | if you would like additional volunteers to help you work on a particular module.

42 | 43 |

If you want to add comaintainers for all the modules in a 44 | distribution, visit 45 | Add Comaintainers per distribution page.

46 | 47 |

Select one or more namespaces:

48 | 49 | <%= select_field "pause99_share_perms_makeco_m" => $pause->{mods}, 50 | multiple => "multiple", 51 | size => (@{$pause->{mods}} > 18 ? 15 : scalar @{$pause->{mods}}), 52 | =%> 53 | 54 |

55 |

Select a userid:
56 | <%= text_field "pause99_share_perms_makeco_a", size => 15, maxlength => 9 %> 57 | 58 |

59 |

61 | 62 | % } else { 63 |

Sorry, there are no modules registered belonging to <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %>.

64 | % } 65 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/perms/_share_movepr.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | 3 | % if (param("SUBMIT_pause99_share_perms_movepr")) { 4 |
5 | % if ($pause->{error}) { 6 |

<%= $pause->{error} %>

7 | % } elsif (@{$pause->{results} || []}) { 8 | % for my $res (@{$pause->{results}}) { 9 | % if ($res->{error}) { 10 |

Error trying to make <%= $res->{user} %> primary maintainer of <%= $res->{mod} %>: <%= $res->{error} %>

\n"; 11 | % } else { 12 |

Made <%= $res->{user} %> primary maintainer of <%= $res->{mod} %>.

13 | % } 14 | % } 15 | % } else { 16 |

You need to select one or more packages and enter a userid. 17 | Nothing done.

18 | % } 19 |
20 |
21 | % } 22 | 23 | % if (@{$pause->{mods}}) { 24 |

Pass maintainership status

Please select one 25 | or more namespaces for which you want to pass primary 26 | maintainership status, enter the CPAN userid of the new 27 | maintainer into the text field and press Pass Maintainership 28 | Status. Note: you keep co-maintainer status after this move. 29 | If you want to get rid of that too, please visit Give up 31 | co-maintainership status next.

32 | 33 |

If you want to transfer all the modules in a distribution, visit 34 | 35 | Transfer Primary Permissions per distribution page.

36 | 37 |

Select one or more namespaces:

38 | <%= select_field "pause99_share_perms_pr_m" => $pause->{mods}, 39 | multiple => "multiple", 40 | size => (@{$pause->{mods}} > 18 ? 15 : scalar @{$pause->{mods}}), 41 | =%> 42 | 43 |

44 |

Select a userid:
45 | <%= text_field "pause99_share_perms_movepr_a", size => 15, maxlength => 9 =%> 46 |

47 |

48 | 49 | % } else { 50 |

Sorry, there are no modules registered belonging to <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %>.

51 | % } 52 | 53 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/perms/_share_remocos.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | 3 | % if (param("SUBMIT_pause99_share_perms_remocos")) { 4 |
5 | % if ($pause->{error}) { 6 |

<%= $pause->{error} %>

7 | % } elsif (@{$pause->{results} || []}) { 8 | % for (@{$pause->{results}}) { 9 | % if ($_->{not_exists}) { 10 |

Cannot handle tuple <%= $_->{mod} %>. If you believe, this is a bug, please complain.

11 | % } elsif ($_->{error}) { 12 |

Error trying to remove <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %>: <%= $_->{error} %>

13 | % } else { 14 |

Removed <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %>.

15 | % } 16 | % } 17 | % } else { 18 |

You need to select one or more packages. Nothing done.

19 | % } 20 |
21 |
22 | % } 23 | 24 | % if (@{$pause->{mods} || []}) { 25 |

Remove co-maintainer status

26 |

The scrolling 27 | list shows you, which packages are associated with other 28 | maintainers besides yourself. Every line denotes a tuple 29 | of a namespace and a userid. Select those that you want to 30 | remove and press Remove

31 | 32 |

If you want to remove comaintainers from all the modules 33 | in a distribution, visit 34 | 35 | Remove Comaintainers per distribution page.

36 | 37 | <%= select_field "pause99_share_perms_remocos_tuples" => $pause->{mods}, 38 | multiple => "multiple", 39 | size => (@{$pause->{mods}} > 18 ? 15 : scalar (@{$pause->{mods}})), 40 | %> 41 |

42 |

43 |

45 | 46 | % } else { 47 |

There are no co-maintainers registered to any of <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %>'s modules.

48 | % } 49 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/perms/_share_remome.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | 3 | % if (param("SUBMIT_pause99_share_perms_remome")) { 4 |
5 | % if ($pause->{error}) { 6 |

<%= $pause->{error} %>

7 | % } elsif (@{$pause->{results} || []}) { 8 | % for (@{$pause->{results}}) { 9 | % if ($_->{error}) { 10 |

Error trying to remove <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %>: <%= $_->{error} %>

11 | % } else { 12 |

Removed <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %>.

13 | % } 14 | % } 15 | % } else { 16 |

You need to select one or more packages. Nothing done.

17 | % } 18 |
19 |
20 | % } 21 | 22 | % if (@{$pause->{mods} || []}) { 23 |

Give up co-maintainer status

24 |

Please select one or 25 | more namespaces for which you want to be removed from 26 | the co-maintainer table and press Give Up

27 | 28 |

If you want to give up comaintainership for all the modules 29 | in a distribution, visit 30 | 31 | Give up Co-maintainership status per distribution page.

32 | 33 |

Select one or more namespaces:

34 | 35 | <%= select_field "pause99_share_perms_remome_m" => $pause->{mods}, 36 | multiple => "multiple", 37 | size => (@{$pause->{mods}} > 18 ? 15 : scalar @{$pause->{mods}}), 38 | =%> 39 | 40 |

41 |

42 |

44 | 45 | % } else { 46 |

Sorry, <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %> does not seem to be co-maintainer of any module.

47 | % } 48 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/perms/_share_remopr.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | 3 | % if (param("SUBMIT_pause99_share_perms_remopr")) { 4 |
5 | % if ($pause->{error}) { 6 |

<%= $pause->{error} %>

7 | % } elsif (!@{$pause->{results} || []}) { 8 |

You need to select one or more packages. Nothing done.

9 | % } else { 10 | % for (@{$pause->{results}}) { 11 | % if ($_->{error}) { 12 |

Error trying to remove primary maintainership of <%= $_->{user} %> from <%= $_->{mod} %>: <%= $_->{error} %>

13 | % } else { 14 |

Removed primary maintainership of <%= $_->{user} %> from <%= $_->{mod} %>.

15 | % } 16 | % } 17 | % } 18 |
19 |
20 | % } 21 | 22 | % if (@{$pause->{mods} || []}) { 23 | 24 |

Give up maintainership status

25 |

Please select one or more namespaces for which you 26 | want to give up primary maintainership status and press 27 | Give Up Maintainership Status. Note: you keep co-maintainer 28 | status after this move. If you want to get rid of that too, 29 | please visit Give up 30 | co-maintainership status next.

31 | 32 |

If you want to give up comaintainership for all the modules 33 | in a distribution, visit 34 | 35 | Give up Co-maintainership status per distribution page.

36 | 37 |

Select one or more namespaces:

38 | <%= select_field "pause99_share_perms_pr_m" => $pause->{mods}, 39 | multilple => "multiple", 40 | size => (@{$pause->{mods}} > 18 ? 15 : scalar @{$pause->{mods}}), 41 | =%> 42 | 43 |

44 |

46 | 47 | % } else { 48 |

Sorry, there are no modules registered belonging to <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %>.

49 | % } 50 | 51 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/perms/giveup_comaint.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 | 5 | 6 | % if (param("SUBMIT_pause99_share_perms_remome")) { 7 |
8 | % if ($pause->{error}) { 9 |

<%= $pause->{error} %>

10 | % } elsif (@{$pause->{results} || []}) { 11 |
    12 | % for (@{$pause->{results}}) { 13 | % if ($_->{error}) { 14 |
  • Error trying to remove <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %>: <%= $_->{error} %>
  • 15 | % } else { 16 |
  • Removed <%= $_->{user} %> from co-maintainers of <%= $_->{mod} %>.
  • 17 | % } 18 | % } 19 |
20 | % } else { 21 |

You need to select one or more packages. Nothing done.

22 | % } 23 |
24 |
25 | % } 26 | 27 | % if (@{$pause->{mods} || []}) { 28 |

Give up co-maintainer status

29 |

Please select one or 30 | more namespaces for which you want to be removed from 31 | the co-maintainer table and press Give Up

32 | 33 |

If you want to give up comaintainership for all the modules 34 | in a distribution, visit 35 | 36 | Give up Co-maintainership status per distribution page.

37 | 38 |

Select one or more namespaces:

39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | % for (@{$pause->{mods}}) { 52 | 53 | 54 | 55 | 56 | 57 | % } 58 | 59 |
PackageIndexed Distribution
<%= check_box "pause99_share_perms_remome_m" => $_ %><%= $_ %><%= $pause->{dist_for_package}{$_} // '' %>
60 |

61 |

63 |
64 | % content_for javascript => begin 65 | %= javascript "/list.min.js" 66 | %= javascript begin 67 | var List = new List('packages', { 68 | valueNames: ['package', 'dist'] 69 | }); 70 | % end 71 | % end 72 | 73 | % } else { 74 |

Sorry, <%= $pause->{HiddenUser}{userid} || $pause->{User}{userid} %> does not seem to be co-maintainer of any module.

75 | % } 76 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/reindex.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | % my $files = $pause->{files} || {}; 4 | 5 | 6 |

Indexing normally happens only once, shortly after the upload takes place. Sometimes it is necessary to reindex a file. The reason is typically one of the following:

7 |
    8 | 9 |
  • A file that contained a current version of a module got deleted, now an older file should be considered current.
  • 10 | 11 |
  • The perms table got altered, now a file should be visited again to overrule the previous indexing decision.
  • 12 | 13 |
  • At the time of uploading PAUSE had a bug and made a wrong indexing decision.
  • 14 | 15 |
16 | 17 |

With this form you can tell the indexer to index selected files again. As it is done by a cron job, it may take up to an hour until the indexer actually executes the command. If this doesn't repair the index, please email me.

18 | 19 | % if (%$files) { 20 | % if ($pause->{mailbody}) { 21 |
<%= $pause->{mailbody} %>

22 | % } 23 | 24 |

Files in directory authors/id/<%= $pause->{userhome} %>

25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | % for my $file (sort keys %$files) { 38 | 39 | 40 | 41 | 42 | % } 43 | 44 |
File
<%= check_box "pause99_reindex_FILE" => $file %><%= $file %>
45 |

46 |
47 | % content_for javascript => begin 48 | %= javascript "/list.min.js" 49 | %= javascript begin 50 | var List = new List('files', { 51 | valueNames: ['file'] 52 | }); 53 | % end 54 | % end 55 | 56 | % } else { 57 | No files found in authors/id/<%= $pause->{userhome} %> 58 | % } 59 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/show_ml_repr.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/tail_logfile.html.ep: -------------------------------------------------------------------------------- 1 | % layout 'layout'; 2 | % my $pause = stash(".pause") || {}; 3 | 4 |
5 | <%= select_field pause99_tail_logfile_1 => [qw/2000 5000 10000 20000 40000/]; =%> 6 | 7 | 8 | 9 | 10 | % for (split /\n/, $pause->{tail}) { 11 | 12 | % } 13 | 14 |
<%= $_ %>
15 |
16 | % content_for javascript => begin 17 | %= javascript "/list.min.js" 18 | %= javascript begin 19 | var logList = new List('logs', {valueNames: ['log']}); 20 | % end 21 | % end 22 | -------------------------------------------------------------------------------- /lib/pause_2017/templates/user/uri/_continued.html.ep: -------------------------------------------------------------------------------- 1 | % my $pause = stash(".pause") || {}; 2 | 3 |
4 | 5 | 6 | % if ($pause->{invalid_uri}) { 7 | % } else { 8 | 9 |

Submitting query

10 | 11 | % if ($pause->{query_succeeded}) { 12 | 13 |

Query succeeded. Thank you for your contribution

14 | 15 |

As it is done by a separate process, it may take a few minutes to 16 | complete the upload. The processing of your file is going on while you 17 | read this. There's no need for you to retry. The form below is only 18 | here in case you want to upload further files.

19 | 20 |

Please tidy up your homedir: CPAN is getting larger every day which 21 | is nice but usually there is no need to keep old an outdated version 22 | of a module on several hundred mirrors. Please consider ">removing old versions of 24 | your module from PAUSE and CPAN. If you are worried that someone might 25 | need an old version, it can always be found on the backpan 27 |

28 | 29 |

Debugging: your submission should show up soon at <%= $pause->{usrdir} %>. If something's wrong, please 31 | check the logfile of the daemon: see the tail of it with <%= $pause->{tailurl} %>. If you already know what's going wrong, you 33 | may wish to visit the ">repair 34 | tool for pending uploads.

35 | 36 | % } else { 37 | 38 |

Could not enter the URL into the database. 39 | Reason:

<%= $pause->{errmsg} %>

40 | 41 | % if ($pause->{duplicate}) { 42 |

This indicates that you probably tried to upload a file that is 43 | already in the database. You will most probably have to rename your 44 | file and try again, because PAUSE doesn't let you upload a file 45 | twice.

46 | 47 |

This seems to be the record causing the conflict:
48 | 49 | % if (my $rec = $pause->{rec}) { 50 | % for my $k (sort keys %$rec) { 51 | 52 | % } 53 | % } 54 |
<%= $k %><%= $rec->{$k} || b(" ") %>
55 |

56 | 57 | % } 58 | % } 59 | % } 60 | 61 | 62 |
63 | 64 |
65 | -------------------------------------------------------------------------------- /one-off-utils/README: -------------------------------------------------------------------------------- 1 | This directory contains scripts that have/had a short lifespan. They 2 | did some job some day and are most likely not needed again, so usually 3 | need no maintainance. They still might be helpful as building blocks 4 | or for the comments they produced. 5 | -------------------------------------------------------------------------------- /one-off-utils/count-yaml-generated-by.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =pod 4 | 5 | Slaven suggests to ignore MET.yml provede by EUMM before 6.25_01 6 | 7 | The output of this script must be postprocessed like so: 8 | 9 | sed -e 's| ./../.*||' count-yaml-generated-by.pl.out|sort|uniq -c 10 | 11 | And from that we learn that 4115 distros have their META.yml produced 12 | by EUMM 6.17 13 | 14 | =cut 15 | 16 | use strict; 17 | use version; 18 | use warnings; 19 | 20 | use Compress::Zlib; 21 | use File::Find; 22 | use YAML; 23 | 24 | our($myml); 25 | find( 26 | { 27 | wanted => sub { 28 | return unless /\.meta$/; 29 | my $yaml = $_; 30 | my($name) = 31 | $File::Find::name =~ m|([A-Z]/[A-Z][A-Z]/[A-Z][A-Z-]*[A-Z]/.+)\.meta$|; 32 | my $y; 33 | eval { $y = YAML::LoadFile($yaml); }; 34 | my $status; 35 | if ($@) { 36 | $status = "yaml_error"; 37 | } else { 38 | if ($y) { 39 | die unless ref $y and ref $y eq "HASH"; 40 | if (exists $y->{generated_by}) { 41 | $status = $y->{generated_by}; 42 | } else { 43 | $status = "no_generated_by"; 44 | } 45 | } else { 46 | $status = "no_yaml"; 47 | } 48 | } 49 | die unless $status; 50 | printf "%s %s\n", $status, $name; 51 | }, 52 | }, 53 | "/home/ftp/pub/PAUSE/authors/id" 54 | ); 55 | 56 | -------------------------------------------------------------------------------- /one-off-utils/diff-02packages.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =pod 4 | 5 | Some of these need a wide screen (ws) 6 | 7 | perl one-off-utils/diff-02packages.pl |awk '{print $1}'|sort|uniq -c|sort -n|perl -nale 'printf "%5d %12s %12s\n", @F'|less 8 | 9 | perl one-off-utils/diff-02packages.pl |awk '{print $3,$4}'|sort|uniq -c|sort -n|perl -nale 'printf "%5d %12s %12s\n", @F' 10 | 11 | perl one-off-utils/diff-02packages.pl |awk '{print $3,$4}'|sort|uniq -c|sort -n|perl -nale 'printf "%5d %12s %12s\n", @F'|less 12 | 13 | (ws) perl one-off-utils/diff-02packages.pl |sort -n -k 3 -k 4 | less 14 | 15 | =cut 16 | 17 | use strict; 18 | use warnings; 19 | 20 | use lib "lib", "privatelib"; 21 | use PAUSE; 22 | use Parse::CPAN::Packages; 23 | 24 | #-rw-r--r-- 1 root root 390344 Sep 15 09:13 /home/ftp/pub/PAUSE/modules/02packages.details.txt-200509150913.gz 25 | #-rw-r--r-- 1 root root 390964 Sep 15 04:48 /home/ftp/pub/PAUSE/modules/02packages.details.txt-200509150120.gz 26 | #-rw-r--r-- 1 500 500 411098 Dec 6 21:15 /home/ftp/pub/PAUSE/modules/02packages.details.txt-20051208.gz 27 | #-rw-r--r-- 1 500 500 411959 Dec 8 11:28 /home/ftp/pub/PAUSE/modules/02packages.details.txt-200512081128.gz 28 | 29 | my $p1 = Parse::CPAN::Packages-> 30 | new("/home/ftp/pub/PAUSE/modules/02packages.details.txt-20051208.gz") or die; 31 | my $p2 = Parse::CPAN::Packages-> 32 | new("/home/ftp/pub/PAUSE/modules/02packages.details.txt-200512081128.gz") or die; 33 | 34 | for my $d1 ($p1->latest_distributions){ 35 | # printf "%s\n", $d1->dist; 36 | for my $pkg1 (@{$d1->packages}) { 37 | my $pkg2 = $p2->package($pkg1->package); 38 | if (!defined $pkg2) { 39 | printf "%s %s %s [MISSING]\n", 40 | $d1->prefix, 41 | $pkg1->package, 42 | $pkg1->version; 43 | next; 44 | } 45 | if ($pkg2->distribution->prefix ne $d1->prefix) { 46 | # due to inconsistencies in the permissions tables of PAUSE and testbox 47 | next; 48 | } 49 | next if $pkg1->version eq $pkg2->version; 50 | # no warnings "numeric"; 51 | next if $pkg1->version eq $pkg2->version; 52 | printf "%-66s %-66s %14s %14s\n", 53 | $d1->prefix, 54 | $pkg1->package, 55 | $pkg1->version, 56 | $pkg2->version; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /one-off-utils/fill_distname.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | use FindBin; 5 | use lib "$FindBin::Bin/../lib"; 6 | use PAUSE; 7 | use DBI; 8 | use CPAN::DistnameInfo; 9 | 10 | my $db = DBI->connect( 11 | $PAUSE::Config->{MOD_DATA_SOURCE_NAME}, 12 | $PAUSE::Config->{MOD_DATA_SOURCE_USER}, 13 | $PAUSE::Config->{MOD_DATA_SOURCE_PW}, 14 | {RaiseError => 0} 15 | ); 16 | 17 | my $ct = 0; 18 | my $rows = $db->selectall_arrayref("SELECT dist, package FROM packages WHERE distname = '' OR distname IS NULL"); 19 | my $total = @$rows; 20 | my $sth = $db->prepare("UPDATE packages SET distname=? WHERE package=?"); 21 | $db->{AutoCommit} = 0; 22 | for my $row (@$rows) { 23 | my ($dist, $package) = @$row; 24 | my $name = CPAN::DistnameInfo->new($dist)->dist; 25 | $sth->execute($name, $package); 26 | if (++$ct % 1000 == 0) { 27 | print "done $ct / $total\n"; 28 | $db->commit; 29 | } 30 | } 31 | $db->commit; 32 | $sth->finish; -------------------------------------------------------------------------------- /one-off-utils/fill_users_with_ustatus.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | =pod 4 | 5 | We just added two fields to table users: 6 | 7 | ustatus enum('unused','active','delete') NOT NULL default 'unused', 8 | ustatus_ch datetime NOT NULL default '0000-00-00 00:00:00', 9 | 10 | Now we must see the backpan and change ustatus to active for all 11 | existing directories userdirectories. 12 | 13 | In mldistwatch, too, we must check for new userdirectories and mark 14 | them. 15 | 16 | =cut 17 | 18 | use strict; 19 | use lib "/home/k/PAUSE/lib"; 20 | use PAUSE; 21 | use DBI; 22 | 23 | my $Rev = q$Rev$; 24 | print "$Rev\n"; 25 | 26 | my $sharp = 1; 27 | 28 | my $db = DBI->connect( 29 | $PAUSE::Config->{MOD_DATA_SOURCE_NAME}, 30 | $PAUSE::Config->{MOD_DATA_SOURCE_USER}, 31 | $PAUSE::Config->{MOD_DATA_SOURCE_PW}, 32 | {RaiseError => 0} 33 | ); 34 | 35 | my $U = $db->selectall_hashref("SELECT userid,ustatus FROM users","userid"); 36 | my $sth = $db->prepare("UPDATE users SET ustatus='active', ustatus_ch=NOW() WHERE userid=?"); 37 | 38 | my $backpan = "/home/ftp/pub/backpan/authors/id"; 39 | opendir my $dh, $backpan or die $!; 40 | for my $de1 (readdir $dh) { 41 | next if $de1 =~ /^\.\.?$/; 42 | die "Illegal directory $backpan/$de1" unless $de1=~/^[A-Z]$/; 43 | opendir my $dh2, "$backpan/$de1" or die $!; 44 | for my $de2 (readdir $dh2) { 45 | next if $de2 =~ /^\.\.?$/; 46 | die "Illegal directory $backpan/$de1/$de2" unless $de2=~/^[A-Z][-A-Z]$/; 47 | opendir my $dh3, "$backpan/$de1/$de2" or die $!; 48 | for my $de3 (readdir $dh3) { 49 | next if $de3 =~ /^\.\.?$/; 50 | # we *have* accepted NI-S and IBMTORDB2: 51 | die "Illegal directory $backpan/$de1/$de2/$de3" 52 | unless $de3=~/^[A-Z][-A-Z]*[A-Z0-9]+$/; 53 | die "Illegal userdirectory $de3" unless $U->{$de3}; 54 | die "Deleted userdirectory $de3" if $U->{$de3}{ustatus} eq 'delete'; 55 | next if $U->{$de3}{ustatus} eq 'active'; 56 | print "Setting $de3 to active\n"; 57 | next unless $sharp; 58 | $sth->execute($de3); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /one-off-utils/schemachange-2005-03-14.sql: -------------------------------------------------------------------------------- 1 | alter table chapters modify chapternr int(10) unsigned not null default '0'; 2 | update chapters set shorttitle=substring(shorttitle,4); 3 | update chapters set chapterid=substring(chapterid,4) where chapterid like '_)%'; 4 | update chapters set chapterid=substring(chapterid,5) where chapterid like '__)%'; 5 | delete from chapters where chapternr=99; 6 | alter table mods modify chapterid int(10) unsigned not null default '0'; 7 | alter table applymod modify chapterid int(10) unsigned not null default '0'; 8 | -------------------------------------------------------------------------------- /one-off-utils/schemachange-2019-04-25.sql: -------------------------------------------------------------------------------- 1 | alter table packages add distname varchar(128) not null default '' after dist; 2 | create index distname on packages (distname); 3 | -------------------------------------------------------------------------------- /one-off-utils/schemachange-2024-04.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE packages ADD COLUMN lc_package varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''; 2 | ALTER TABLE primeur ADD COLUMN lc_package varchar(245) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''; 3 | ALTER TABLE perms ADD COLUMN lc_package varchar(245) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''; 4 | UPDATE packages SET lc_package = LOWER(package); 5 | UPDATE primeur SET lc_package = LOWER(package); 6 | UPDATE perms SET lc_package = LOWER(package); 7 | ALTER TABLE packages ADD INDEX lc_package (lc_package); 8 | ALTER TABLE primeur ADD INDEX lc_package (lc_package); 9 | ALTER TABLE perms ADD INDEX lc_package (lc_package); 10 | -------------------------------------------------------------------------------- /one-off-utils/sharpen-distmtimes-fromdata.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =pod 4 | 5 | Better name would hve been: reindex-from-lst or some such. 6 | 7 | Remove everything from distmtimes that prevents mldistwatch from indexing. 8 | 9 | Used twice to fix #16293 on rt.cpan.org 10 | 11 | =cut 12 | 13 | use strict; 14 | use warnings; 15 | 16 | use lib "lib", "privatelib"; 17 | use PAUSE; 18 | 19 | my $dbh = PAUSE::dbh; 20 | my $sth = $dbh->prepare("delete from distmtimes where dist=?"); 21 | $| = 1; 22 | while (){ 23 | chomp; 24 | my $rows = $sth->execute($_); 25 | print $rows; 26 | sleep 360; 27 | } 28 | print "\n"; 29 | 30 | __END__ 31 | D/DM/DMUEY/Acme-Scripticide-v0.0.4.tar.gz 32 | D/DM/DMUEY/Acme-ScriptoPhrenic-v0.0.2.tar.gz 33 | D/DM/DMUEY/AltaVista-BabelFish-v42.0.1.tar.gz 34 | D/DM/DMUEY/Unix-PID-v0.0.2.tar.gz 35 | D/DO/DOUGW/LISP-0.01.tar.gz 36 | F/FK/FKUO/MCrypt-0.92.tar.gz 37 | F/FK/FKUO/Mhash-0.90.tar.gz 38 | G/GA/GAAS/UDDI-0.03.tar.gz 39 | G/GE/GENE/URI-Collection-0.08.tar.gz 40 | J/JA/JASONK/Data-Faker-0.07.tar.gz 41 | J/JE/JETTERO/MySQL-GUI-0.33.tar.gz 42 | J/JG/JGLICK/ModsPragma-0.004.tar.gz 43 | J/JG/JGLICK/Sys-Pushd-0.001.tar.gz 44 | J/JG/JGLICK/Test-Helper-0.002.tar.gz 45 | J/JO/JONAS/RDF-Service-0.04.tar.gz 46 | K/KR/KRAEHE/CGI-pWiki-0.15.tar.gz 47 | L/LM/LMEYER/Class-Std-Storable-v0.0.1.tar.gz 48 | L/LU/LUISMUNOZ/Authen-PIN-1.10.tar.gz 49 | L/LU/LUISMUNOZ/Barcode-Cuecat-1.20.tar.gz 50 | L/LU/LUISMUNOZ/Number-Encode-1.00.tar.gz 51 | M/MA/MAIRE/Chess-Pgn-0.03.tar.gz 52 | M/MA/MARCEL/Attribute-TieClasses-0.01.tar.gz 53 | M/MA/MARCEL/DBIx-Renderer-0.01.tar.gz 54 | M/MA/MARCEL/GraphViz-ISA-0.01.tar.gz 55 | M/MC/MCMAHON/WWW-Mechanize-Plugin-Cache-0.02.tar.gz 56 | M/ME/METZZO/Variable-Strongly-Typed-v1.1.0.tar.gz 57 | M/MG/MGILFIX/Notify-0.0.1.tar.gz 58 | M/ML/MLEHMANN/Gimp-1.211.tar.gz 59 | M/MS/MSPENCER/ProLite-0.01.tar.gz 60 | N/NM/NMCFARL/Net-Growl-0.99.tar.gz 61 | P/PD/PDCAWLEY/Interface-Polymorphism-0.2.tar.gz 62 | P/PT/PTULLY/FedEx-0.10.tar.gz 63 | S/SA/SAMTREGAR/Tie-IntegerArray-0.01.tar.gz 64 | S/SP/SPURKIS/Pangloss-0.06.tar.gz 65 | S/SP/SPURKIS/accessors-0.02.tar.gz 66 | S/ST/STEVEGT/Mail-TieFolder-0.03.tar.gz 67 | S/ST/STEVEGT/Mail-TieFolder-mh-0.04.tar.gz 68 | T/TO/TODD/SQL-Schema-0.31.tar.gz 69 | W/WM/WMCKEE/Petal-Utils-0.06.tar.gz 70 | -------------------------------------------------------------------------------- /one-off-utils/sharpen-distmtimes.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =pod 4 | 5 | remove everything from distmtimes that prevents mldistwatch from indexing. 6 | 7 | I'm using it to study the outcome of the new version-enhanced mldistwatch. 8 | 9 | =cut 10 | 11 | use strict; 12 | use warnings; 13 | 14 | use lib "lib", "privatelib"; 15 | use PAUSE; 16 | use Parse::CPAN::Packages; 17 | 18 | my $dbh = PAUSE::dbh; 19 | my $sth = $dbh->prepare("delete from distmtimes where dist=?"); 20 | my $p = Parse::CPAN::Packages-> 21 | new("/home/ftp/pub/PAUSE/modules/02packages.details.txt-20051208.gz") or die; 22 | $| = 1; 23 | my $i; 24 | for my $d ($p->latest_distributions){ 25 | my $prefix = $d->prefix; 26 | # warn "sharpening prefix[$prefix]\n"; 27 | print "." unless ++$i % 32; 28 | $sth->execute($prefix); 29 | } 30 | print "\n"; 31 | -------------------------------------------------------------------------------- /one-off-utils/show-stale-registered-modulenames.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =pod 4 | 5 | posted by Steffen mueller on modules@perl.org on Aug 31, 2007 6 | 7 | =cut 8 | 9 | use strict; 10 | use warnings; 11 | { 12 | open my $fh1, '<', "03modlist.data" or die; 13 | while (<$fh1>) { 14 | next unless /^\s*$/; 15 | last; 16 | } 17 | local $/; 18 | my $code = <$fh1>; 19 | warn sprintf "length(code)[%d]", length $code; 20 | eval $code; 21 | close $fh1; 22 | } 23 | 24 | open my $fh, '<', "02packages.details.txt" or die $!; 25 | my %packages; 26 | my $started = 0; 27 | while (<$fh>) { 28 | $started = 1, next if /^\s*$/; 29 | next if not $started; 30 | chomp; 31 | my @rec = split /\s+/, $_; 32 | $rec[2] =~ /^[\w-]\/[\w-]{2}\/([\w-]+)\// or die("Invalid dist name: 33 | $rec[2]!"); 34 | my $author = $1; 35 | $packages{$rec[0]} = { 36 | name => $rec[0], 37 | dist => $rec[2], 38 | author => $author, 39 | }; 40 | } 41 | close $fh; 42 | 43 | my $modhash = CPAN::Modulelist::data(); 44 | 45 | foreach my $module (keys %$modhash) { 46 | warn "Checking $module\n"; 47 | my $pkg = $packages{$module}; 48 | if (not defined $pkg) { 49 | print "$module\n"; 50 | next; 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /privatelib/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/privatelib/.gitignore -------------------------------------------------------------------------------- /services/pause-web.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=PAUSE web service 3 | Documentation=https://github.com/andk/PAUSE/ 4 | 5 | # Wait for the network to be up 6 | After=network-online.target 7 | 8 | # Require the network service to be present, and at least started at the same time as this service 9 | Wants=network-online.target 10 | 11 | [Service] 12 | Type=simple 13 | 14 | User=pause 15 | Group=pause 16 | WorkingDirectory=/home/pause/pause 17 | 18 | # Should not daemonize 19 | ExecStart=/home/pause/.plenv/shims/plackup -s Starman --port 5000 app_2017.psgi 20 | 21 | Restart=on-failure 22 | RestartSec=30 23 | 24 | [Install] 25 | WantedBy=multi-user.target 26 | -------------------------------------------------------------------------------- /services/paused.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=PAUSE service 3 | Documentation=https://github.com/andk/PAUSE/ 4 | 5 | # Wait for the network to be up 6 | After=network-online.target 7 | 8 | # Require the network service to be present, and at least started at the same time as this service 9 | Wants=network-online.target 10 | 11 | [Service] 12 | Type=simple 13 | 14 | User=pause 15 | Group=pause 16 | WorkingDirectory=/home/pause/pause 17 | 18 | # Should not daemonize 19 | ExecStart=/home/pause/.plenv/shims/perl /home/pause/pause/bin/paused --pidfile /home/pause/pid/paused.pid 20 | 21 | Restart=on-failure 22 | RestartSec=30 23 | 24 | [Install] 25 | WantedBy=multi-user.target 26 | -------------------------------------------------------------------------------- /t/70_critic.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use File::Spec; 4 | use Test::More; 5 | 6 | if ($ENV{NO_PERL_CRITIC}) { 7 | plan( skip_all => '$NO_PERL_CRITIC set, skipping'); 8 | } 9 | 10 | eval { require Test::Perl::Critic; }; 11 | 12 | if ( $@ ) { 13 | my $msg = 'Test::Perl::Critic required to criticise code'; 14 | plan( skip_all => $msg ); 15 | } 16 | 17 | my $rcfile = File::Spec->catfile( 't', 'perlcriticrc' ); 18 | Test::Perl::Critic->import( -profile => $rcfile ); 19 | all_critic_ok(qw( bin cron lib t )); 20 | 21 | # Local Variables: 22 | # mode: cperl 23 | # cperl-indent-level: 4 24 | # End: 25 | -------------------------------------------------------------------------------- /t/crypt.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | use PAUSE::Crypt; 5 | use Test::More; 6 | 7 | my $password = "Scrapple? Yum!!"; 8 | my $salt = "We luv scrapple."; 9 | 10 | my $crypt = 'We.cEH7/uontQ'; 11 | my $bcrypt = '$2$10$T0SeZFT0GFLhakDuaEvjJebxqvqD2ndcK00JVvsAK0IvYPsMqMO1y'; 12 | 13 | ok( 14 | PAUSE::Crypt::password_verify($password, $crypt), 15 | "we can verify DES password", 16 | ); 17 | 18 | ok( 19 | PAUSE::Crypt::password_verify($password, $bcrypt), 20 | "we can verify bcrypt password", 21 | ); 22 | 23 | my $new_hash = PAUSE::Crypt::hash_password($password); 24 | ok( 25 | PAUSE::Crypt::password_verify($password, $new_hash), 26 | "we can verify newly-generated bcrypt password", 27 | ); 28 | 29 | ok( 30 | ! PAUSE::Crypt::password_verify('bogus', $crypt), 31 | "we reject bad pw against crypt hash", 32 | ); 33 | 34 | ok( 35 | ! PAUSE::Crypt::password_verify('bogus', $bcrypt), 36 | "we reject bad pw against bcrypt hash", 37 | ); 38 | 39 | ok( 40 | ! PAUSE::Crypt::password_verify('bogus', $new_hash), 41 | "we reject bad pw against new hash", 42 | ); 43 | 44 | done_testing; 45 | -------------------------------------------------------------------------------- /t/data/files/somefile.txt: -------------------------------------------------------------------------------- 1 | Just a file 2 | -------------------------------------------------------------------------------- /t/dist/My-Dist.yaml: -------------------------------------------------------------------------------- 1 | name: My-Dist 2 | version: 0.02 3 | provides: 4 | My::Dist: 5 | version: 0.02 6 | file: lib/My/Dist.pm 7 | -------------------------------------------------------------------------------- /t/isa-perl.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | 3 | use lib 't/lib'; 4 | use lib 't/privatelib'; # Stub PrivatePAUSE 5 | use TestSetup; 6 | use Test::More; 7 | use PAUSE; 8 | 9 | my @positive = qw( 10 | C/CB/CBAIL/perl5_003.tar-gz 11 | A/AN/ANDYD/perl5.003_07.tar.gz 12 | T/TI/TIMB/perl5.004_04.tar.gz 13 | D/DA/DAPM/perl-5.10.1.tar.bz2 14 | N/NW/NWCLARK/perl-5.8.9.tar.gz 15 | J/JE/JESSE/perl-5.14.0.tar.gz 16 | ); 17 | 18 | my @negative = qw( 19 | I/IN/INGY/perl5-0.02.tar.gz 20 | J/JE/JESSE/perl-5.14.0-RC3.tar.gz 21 | B/BI/BINGOS/perl-5.13.7.tar.gz 22 | ); 23 | 24 | plan tests => @positive + @negative; 25 | 26 | ok( PAUSE::isa_regular_perl($_), "$_ isa regular perl") for @positive; 27 | ok(!PAUSE::isa_regular_perl($_), "$_ is not a regular perl") for @negative; 28 | 29 | # Local Variables: 30 | # mode: cperl 31 | # cperl-indent-level: 4 32 | # End: 33 | -------------------------------------------------------------------------------- /t/lib/Email/Sender/Transport/KeepDeliveries.pm: -------------------------------------------------------------------------------- 1 | package Email::Sender::Transport::KeepDeliveries; 2 | use Moo; 3 | extends 'Email::Sender::Transport::Wrapper'; 4 | 5 | # Wrap whatever transport that the user wants to really use, and provide a 6 | # passthrough interface to Email::Sender::Transport::Test, which will also 7 | # be given each message to 'send'. 8 | # 9 | # Usage: 10 | # 11 | # $ENV{EMAIL_SENDER_TRANSPORT} = 'KeepDeliveries'; 12 | # 13 | # $ENV{EMAIL_SENDER_TRANSPORT_transport_class} = 'Maildir'; 14 | # $ENV{EMAIL_SENDER_TRANSPORT_transport_arg_dir} = 'some-mail-dir'; 15 | # ... other args as necessary 16 | 17 | use Email::Sender::Transport::Test; 18 | 19 | has 'test' => ( 20 | is => 'ro', 21 | isa => sub { ref $_[0] eq 'Email::Sender::Transport::Test' }, 22 | default => sub { Email::Sender::Transport::Test->new() }, 23 | handles => [ qw( 24 | delivery_count 25 | deliveries 26 | shift_deliveries 27 | clear_deliveries 28 | ) ], 29 | ); 30 | 31 | around send_email => sub { 32 | my ($orig, $self, $email, $env, @rest) = @_; 33 | 34 | $self->$orig($email, $env, @rest); 35 | 36 | $self->test->send_email($email, $env, @rest); 37 | }; 38 | 39 | no Moo; 40 | 1; 41 | -------------------------------------------------------------------------------- /t/lib/Mock/Dist.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | package Mock::Dist; 5 | 6 | use base qw(Test::MockObject); 7 | use Test::More (); 8 | use Test::Deep (); 9 | 10 | my $null = sub {}; 11 | 12 | my @NULL = qw(verbose alert connect disconnect mlroot); 13 | 14 | my %ALWAYS = ( 15 | version_from_meta_ok => 1, 16 | ); 17 | 18 | sub new { 19 | my $self = shift->SUPER::new(@_); 20 | 21 | $self->mock($_ => $null) for @NULL; 22 | 23 | $self->set_always($_ => $ALWAYS{$_}) for keys %ALWAYS; 24 | 25 | return $self; 26 | } 27 | 28 | sub next_call_ok { 29 | my ($self, $method, $args, $label) = @_; 30 | unless ($label) { 31 | $label = "$method: " . join ", ", @$args; 32 | $label =~ s/\n$//; 33 | $label =~ s/\n.+$/.../s; 34 | } 35 | Test::Deep::cmp_deeply( 36 | [ $self->next_call ], 37 | [ $method => [ $self, @$args ] ], 38 | $label, 39 | ); 40 | } 41 | 42 | 1; 43 | -------------------------------------------------------------------------------- /t/lib/TestSetup.pm: -------------------------------------------------------------------------------- 1 | package TestSetup; 2 | 3 | use File::Path; 4 | use File::Spec; 5 | my $path = File::Spec->catdir(qw(blib privatelib)); 6 | my $file = File::Spec->catfile($path, 'PrivatePAUSE.pm'); 7 | die "mkpath $path: $!" unless -d $path or mkpath $path; 8 | 9 | unless (-e $file) { 10 | die "$file: $!" unless open my $fh, '>', $file; 11 | die "$file: $!" unless print $fh "package PrivatePAUSE;\n1;\n"; 12 | } 13 | 14 | 1; 15 | -------------------------------------------------------------------------------- /t/mldistwatch-db.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | use 5.10.1; 5 | use lib 't/lib'; 6 | use lib 't/privatelib'; # Stub PrivatePAUSE 7 | 8 | use File::Spec; 9 | use PAUSE; 10 | use PAUSE::TestPAUSE; 11 | 12 | use Test::More; 13 | 14 | subtest "retry indexing on db failure" => sub { 15 | my $pause = PAUSE::TestPAUSE->init_new; 16 | 17 | $pause->upload_author_fake(PAUSEID => { 18 | name => 'Jenkins-Hack', 19 | version => 0.14, 20 | packages => [ qw( Jenkins::Hack Jenkins::Hack2 Jenkins::Hack::Utils ) ], 21 | }); 22 | 23 | local $PAUSE::Config->{PRE_DB_WORK_CALLBACK} = sub { 24 | state $x = 1; 25 | if ($x) { 26 | $x--, die PAUSE::DBError->new("dying for diagnostic purposes (x eq $x)\n"); 27 | } 28 | }; 29 | 30 | my $result = $pause->test_reindex; 31 | 32 | $result->package_list_ok( 33 | [ 34 | { package => 'Jenkins::Hack', version => '0.14' }, 35 | { package => 'Jenkins::Hack2', version => '0.14' }, 36 | { package => 'Jenkins::Hack::Utils', version => '0.14' }, 37 | ], 38 | ); 39 | }; 40 | 41 | subtest "retry indexing on db failure, only three times" => sub { 42 | my $pause = PAUSE::TestPAUSE->init_new; 43 | 44 | $pause->upload_author_fake(PAUSEID => { 45 | name => 'Jenkins-Hack', 46 | version => 0.14, 47 | packages => [ qw( Jenkins::Hack Jenkins::Hack2 Jenkins::Hack::Utils ) ], 48 | }); 49 | 50 | my $x = 0; 51 | local $PAUSE::Config->{PRE_DB_WORK_CALLBACK} = sub { 52 | $x++; 53 | die PAUSE::DBError->new("dying for diagnostic purposes (failure $x)\n"); 54 | }; 55 | 56 | my $result = $pause->test_reindex; 57 | 58 | is($x, 3, "we tried three times, and no more"); 59 | 60 | $result->assert_index_not_updated; 61 | 62 | $result->email_ok( 63 | [ 64 | { subject => 'Failed: PAUSE indexer report PAUSEID/Jenkins-Hack-0.14.tar.gz', 65 | callbacks => [ 66 | sub { 67 | my $index = index $_[0]->{email}->object->body_str, 68 | m{ERROR: Database error occurred during index}; 69 | ok($index >= 0, "our indexer report mentions db error"); 70 | }, 71 | ] 72 | }, 73 | { subject => 'PAUSE upload indexing error' }, 74 | ], 75 | ); 76 | }; 77 | 78 | done_testing; 79 | 80 | # Local Variables: 81 | # mode: cperl 82 | # cperl-indent-level: 4 83 | # End: 84 | -------------------------------------------------------------------------------- /t/pause.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | use 5.10.1; 5 | use lib 't/lib'; 6 | use lib 't/privatelib'; 7 | 8 | use File::Spec; 9 | use PAUSE; 10 | 11 | use Test::More; 12 | 13 | my $dir = __FILE__; 14 | $dir =~ s/pause.t$//; 15 | 16 | subtest "PAUSE::filehash md5sum/sha1sum" => sub { 17 | my $file = "$dir/data/files/somefile.txt"; 18 | 19 | my $res = PAUSE::filehash($file); 20 | 21 | is ($res, < sub { 31 | my @may = qw( 32 | readme 33 | README 34 | README.md 35 | docs.txt 36 | spec.mkdn 37 | 01-Super-Important.pdf 38 | ); 39 | 40 | my @maynt = qw( 41 | Dist-Zilla 42 | Dist-Zilla.pm 43 | Dist-Zilla.tar 44 | ); 45 | 46 | for my $file (map {; $_, "$_.gz", "$_.bz2" } @may) { 47 | ok(PAUSE::may_overwrite_file($file), "may overwrite $file"); 48 | } 49 | 50 | for my $file (map {; $_, "$_.gz", "$_.bz2" } @maynt) { 51 | ok(!PAUSE::may_overwrite_file($file), "may not overwrite $file"); 52 | } 53 | }; 54 | 55 | done_testing; 56 | -------------------------------------------------------------------------------- /t/pause_2017/00_load.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/lib"; 4 | use Test::PAUSE::Web; 5 | use Test::More; 6 | use File::Find; 7 | use Path::Tiny; 8 | 9 | note "AppRoot: $Test::PAUSE::Web::AppRoot"; 10 | 11 | find({wanted => sub { 12 | my $file = path($File::Find::name); 13 | my $path = $file->relative("$Test::PAUSE::Web::AppRoot/lib/pause_2017"); 14 | $path =~ s|\.pm$|| or return; 15 | $path =~ s|/|::|g; 16 | use_ok($path); 17 | }, no_chdir => 1}, "$Test::PAUSE::Web::AppRoot/lib/pause_2017/PAUSE"); 18 | 19 | done_testing; 20 | 21 | -------------------------------------------------------------------------------- /t/pause_2017/action/edit_cred.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | my $default = { 8 | pause99_edit_cred_fullname => "new fullname", 9 | pause99_edit_cred_asciiname => "new ascii name", 10 | pause99_edit_cred_email => "new_email\@localhost.localdomain", 11 | pause99_edit_cred_homepage => "none", 12 | pause99_edit_cred_cpan_mail_alias => "none", 13 | pause99_edit_cred_sub => 1, 14 | }; 15 | 16 | Test::PAUSE::Web->setup; 17 | 18 | subtest 'get' => sub { 19 | for my $test (Test::PAUSE::Web->tests_for('user')) { 20 | my ($path, $user) = @$test; 21 | my $t = Test::PAUSE::Web->new(user => $user); 22 | $t->get_ok("$path?ACTION=edit_cred"); 23 | # note $t->content; 24 | } 25 | }; 26 | 27 | subtest 'post: basic' => sub { 28 | plan skip_all => 'SKIP for now'; 29 | for my $test (Test::PAUSE::Web->tests_for('user')) { 30 | my ($path, $user) = @$test; 31 | my $t = Test::PAUSE::Web->new(user => $user); 32 | 33 | my %form = %$default; 34 | $t->post_ok("$path?ACTION=edit_cred", \%form); 35 | # note $t->content; 36 | } 37 | }; 38 | 39 | subtest 'post_with_token: basic' => sub { 40 | for my $test (Test::PAUSE::Web->tests_for('user')) { 41 | my ($path, $user) = @$test; 42 | my $t = Test::PAUSE::Web->new(user => $user); 43 | 44 | my %form = %$default; 45 | $t->post_with_token_ok("$path?ACTION=edit_cred", \%form); 46 | # note $t->content; 47 | } 48 | }; 49 | 50 | subtest 'post_with_token: edit with CENSORED email' => sub { 51 | for my $test (Test::PAUSE::Web->tests_for('user')) { 52 | my ($path, $user) = @$test; 53 | my $t = Test::PAUSE::Web->new(user => $user); 54 | 55 | Test::PAUSE::Web->setup; 56 | $t->mod_db->update('users', { email => 'CENSORED' }, { userid => $user }); 57 | my %form = (%$default, pause99_edit_cred_email => 'CENSORED'); 58 | $t->post_with_token_ok("$path?ACTION=edit_cred", \%form); 59 | my @deliveries = $t->deliveries; 60 | like $deliveries[0]->as_string => qr/\[CENSORED\]/; 61 | # note $t->content; 62 | } 63 | }; 64 | 65 | done_testing; 66 | -------------------------------------------------------------------------------- /t/pause_2017/action/edit_ml.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=edit_ml"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/edit_uris.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | my $default_for_add_uri = { 8 | pause99_add_uri_httpupload => ["$Test::PAUSE::Web::AppRoot/t/staging/Hash-RenameKey-0.02.tar.gz", "Hash-RenameKey-0.02.tar.gz"], 9 | SUBMIT_pause99_add_uri_httpupload => 1, 10 | }; 11 | 12 | my $default = { 13 | pause99_edit_uris_3 => "T/TE/TESTUSER/Hash-RenameKey-0.02.tar.gz", 14 | pause99_edit_uris_2 => 1, 15 | }; 16 | 17 | Test::PAUSE::Web->setup; 18 | 19 | subtest 'get' => sub { 20 | for my $test (Test::PAUSE::Web->tests_for('user')) { 21 | my ($path, $user) = @$test; 22 | my $t = Test::PAUSE::Web->new(user => $user); 23 | $t->get_ok("$path?ACTION=edit_uris"); 24 | # note $t->content; 25 | } 26 | }; 27 | 28 | subtest 'post: basic' => sub { 29 | for my $test (Test::PAUSE::Web->tests_for('user')) { 30 | my ($path, $user) = @$test; 31 | my $t = Test::PAUSE::Web->new(user => $user); 32 | 33 | $t->mod_dbh->do("TRUNCATE uris"); 34 | 35 | # prepare distribution 36 | $t->post_ok("$path?ACTION=add_uri", $default_for_add_uri, "Content-Type" => "form-data"); 37 | 38 | my %form = %$default; 39 | $form{pause99_edit_uris_3} =~ s/TESTUSER/$user/; 40 | $t->post_ok("$path?ACTION=edit_uris", \%form); 41 | # note $t->content; 42 | } 43 | }; 44 | 45 | done_testing; 46 | -------------------------------------------------------------------------------- /t/pause_2017/action/email_for_admin.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=email_for_admin"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/manage_id_requests.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=manage_id_requests"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_04about.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_04about"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_04imprint.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_04imprint"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_05news.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_05news"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_06history.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_06history"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_logout.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('user')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_logout"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_namingmodules.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_namingmodules"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_operating_model.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_operating_model"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/pause_privacy_policy.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('public')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=pause_privacy_policy"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/reindex.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | my $default_for_add_uri = { 8 | pause99_add_uri_httpupload => [Test::PAUSE::Web->file_to_upload], 9 | SUBMIT_pause99_add_uri_httpupload => 1, 10 | }; 11 | 12 | my $default = { 13 | pause99_reindex_FILE => ["Hash-RemoteKey-0.02.tar.gz"], 14 | SUBMIT_pause99_reindex_delete => 1, 15 | }; 16 | 17 | Test::PAUSE::Web->setup; 18 | 19 | subtest 'get' => sub { 20 | for my $test (Test::PAUSE::Web->tests_for('user')) { 21 | my ($path, $user) = @$test; 22 | my $t = Test::PAUSE::Web->new(user => $user); 23 | $t->get_ok("$path?ACTION=reindex"); 24 | # note $t->content; 25 | } 26 | }; 27 | 28 | subtest 'post: basic' => sub { 29 | for my $test (Test::PAUSE::Web->tests_for('user')) { 30 | my ($path, $user) = @$test; 31 | 32 | my $t = Test::PAUSE::Web->new(user => $user); 33 | 34 | $t->mod_dbh->do("TRUNCATE uris"); 35 | 36 | # prepare distribution 37 | $t->post_ok("$path?ACTION=add_uri", $default_for_add_uri, "Content-Type" => "form-data"); 38 | 39 | $t->copy_to_authors_dir($user, scalar Test::PAUSE::Web->file_to_upload); 40 | 41 | my %form = %$default; 42 | $t->post_ok("$path?ACTION=reindex", \%form); 43 | # note $t->content; 44 | } 45 | }; 46 | 47 | done_testing; 48 | -------------------------------------------------------------------------------- /t/pause_2017/action/reset_version.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | my $default = { 8 | pause99_reset_version_PKG => ["Foo"], 9 | SUBMIT_pause99_reset_version_forget => 1, 10 | }; 11 | 12 | Test::PAUSE::Web->setup; 13 | 14 | subtest 'get' => sub { 15 | for my $test (Test::PAUSE::Web->tests_for('user')) { 16 | my ($path, $user) = @$test; 17 | my $t = Test::PAUSE::Web->new(user => $user); 18 | $t->get_ok("$path?ACTION=reset_version"); 19 | # note $t->content; 20 | } 21 | }; 22 | 23 | subtest 'post: basic' => sub { 24 | for my $test (Test::PAUSE::Web->tests_for('user')) { 25 | my ($path, $user) = @$test; 26 | my $t = Test::PAUSE::Web->new(user => $user); 27 | 28 | $t->mod_dbh->do("TRUNCATE packages"); 29 | $t->mod_db->insert('packages', { 30 | package => "Foo", 31 | version => "0.01", 32 | dist => "T/TE/$user/Foo-0.01.tar.gz", 33 | file => "Foo-0.01.tar.gz", 34 | }); 35 | $t->mod_db->insert('packages', { 36 | package => "Bar", 37 | version => "0.02", 38 | dist => "T/TE/$user/Bar-0.02.tar.gz", 39 | file => "Bar-0.02.tar.gz", 40 | }); 41 | 42 | my %form = %$default; 43 | $t->post_ok("$path?ACTION=reset_version", \%form); 44 | # note $t->content; 45 | } 46 | }; 47 | 48 | done_testing; 49 | -------------------------------------------------------------------------------- /t/pause_2017/action/select_ml_action.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | my $mailing_list = { 8 | SUBMIT_pause99_add_user_Definitely => 1, 9 | pause99_add_user_userid => "MAILLIST", 10 | pause99_add_user_email => "ml\@localhost.localdomain", 11 | pause99_add_user_subscribe => "how to subscribe", 12 | }; 13 | 14 | my $default = { 15 | HIDDENNAME => "TESTUSER", 16 | ACTIONREQ => "edit_ml", 17 | pause99_select_ml_action_sub => 1, 18 | }; 19 | 20 | Test::PAUSE::Web->setup; 21 | 22 | subtest 'get' => sub { 23 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 24 | my ($path, $user) = @$test; 25 | my $t = Test::PAUSE::Web->new(user => $user); 26 | $t->get_ok("$path?ACTION=select_ml_action"); 27 | # note $t->content; 28 | } 29 | }; 30 | 31 | subtest 'post: basic' => sub { 32 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 33 | my ($path, $user) = @$test; 34 | my $t = Test::PAUSE::Web->new(user => $user); 35 | 36 | $t->post_ok("$path?ACTION=add_user", $mailing_list); 37 | 38 | $t->mod_db->insert("list2user", { 39 | maillistid => "MAILLIST", 40 | userid => "TESTUSER", 41 | }, {ignore => 1}); 42 | 43 | my %form = %$default; 44 | $t->post_ok("$path?ACTION=select_ml_action", \%form); 45 | # note $t->content; 46 | } 47 | }; 48 | 49 | done_testing; 50 | -------------------------------------------------------------------------------- /t/pause_2017/action/select_user.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=select_user"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/share_perms.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('user')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=share_perms"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/show_files.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('user')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=show_files"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/show_ml_repr.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | subtest 'get' => sub { 10 | for my $test (Test::PAUSE::Web->tests_for('admin')) { 11 | my ($path, $user) = @$test; 12 | my $t = Test::PAUSE::Web->new(user => $user); 13 | $t->get_ok("$path?ACTION=show_ml_repr"); 14 | # note $t->content; 15 | } 16 | }; 17 | 18 | done_testing; 19 | -------------------------------------------------------------------------------- /t/pause_2017/action/tail_logfile.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | 7 | my $default = { 8 | pause99_tail_logfile_1 => 5000, 9 | pause99_tail_logfile_sub => 1, 10 | }; 11 | 12 | Test::PAUSE::Web->setup; 13 | 14 | { 15 | open my $fh, '>', $PAUSE::Config->{PAUSE_LOG}; 16 | say $fh < sub { 24 | for my $test (Test::PAUSE::Web->tests_for('user')) { 25 | my ($path, $user) = @$test; 26 | my $t = Test::PAUSE::Web->new(user => $user); 27 | $t->get_ok("/pause/authenquery?ACTION=tail_logfile"); 28 | # note $t->content; 29 | } 30 | }; 31 | 32 | subtest 'post: basic' => sub { 33 | for my $test (Test::PAUSE::Web->tests_for('user')) { 34 | my ($path, $user) = @$test; 35 | my $t = Test::PAUSE::Web->new(user => $user); 36 | 37 | my %form = %$default; 38 | $t->post_ok("$path?ACTION=tail_logfile", \%form); 39 | # note $t->content; 40 | } 41 | }; 42 | 43 | done_testing; 44 | -------------------------------------------------------------------------------- /t/pause_2017/action/who_admin.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use YAML::Syck (); 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | # SELECT user FROM grouptable WHERE ugroup='admin' order by user"); 10 | subtest 'get' => sub { 11 | Test::PAUSE::Web->authen_db->insert('grouptable', { 12 | user => "FOO", 13 | ugroup => "admin", 14 | }); 15 | Test::PAUSE::Web->authen_db->insert('grouptable', { 16 | user => "BAR", 17 | ugroup => "admin", 18 | }); 19 | Test::PAUSE::Web->authen_db->insert('grouptable', { 20 | user => "BAZ", 21 | ugroup => "bar", 22 | }); 23 | 24 | for my $test (Test::PAUSE::Web->tests_for('public')) { 25 | my ($path, $user) = @$test; 26 | my $t = Test::PAUSE::Web->new(user => $user); 27 | 28 | $t->get_ok("$path?ACTION=who_admin") 29 | ->text_like('body', qr/Registered admins:\s+BAR, FOO/); 30 | 31 | $t->get_ok("$path?ACTION=who_admin&OF=YAML"); 32 | my $list_amp = YAML::Syck::Load( $t->content ); 33 | is_deeply( $list_amp, [qw/BAR FOO TESTADMIN/], "YAML output works" ); 34 | 35 | SKIP: { 36 | skip "; is not supported anymore", 1; 37 | $t->get_ok("$path?ACTION=who_admin;OF=YAML"); 38 | my $list_sem = YAML::Syck::Load( $t->content ); 39 | is_deeply( $list_sem, [qw/BAR FOO TESTADMIN/], "YAML output works" ); 40 | } 41 | } 42 | }; 43 | 44 | done_testing; 45 | -------------------------------------------------------------------------------- /t/pause_2017/action/who_pumpkin.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/../lib"; 4 | use Test::PAUSE::Web; 5 | use YAML::Syck (); 6 | 7 | Test::PAUSE::Web->setup; 8 | 9 | # SELECT user FROM grouptable WHERE ugroup='pumpking' order by user"); 10 | subtest 'get' => sub { 11 | Test::PAUSE::Web->authen_db->insert('grouptable', { 12 | user => "FOO", 13 | ugroup => "pumpking", 14 | }); 15 | Test::PAUSE::Web->authen_db->insert('grouptable', { 16 | user => "BAR", 17 | ugroup => "pumpking", 18 | }); 19 | Test::PAUSE::Web->authen_db->insert('grouptable', { 20 | user => "BAZ", 21 | ugroup => "baz", 22 | }); 23 | 24 | for my $test (Test::PAUSE::Web->tests_for('public')) { 25 | my ($path, $user) = @$test; 26 | my $t = Test::PAUSE::Web->new(user => $user); 27 | 28 | $t->get_ok("$path?ACTION=who_pumpkin") 29 | ->text_like("body", qr/Registered pumpkins:\s+BAR, FOO/); 30 | 31 | $t->get_ok("$path?ACTION=who_pumpkin&OF=YAML"); 32 | my $list_amp = YAML::Syck::Load( $t->content ); 33 | is_deeply( $list_amp, [qw/BAR FOO/], "YAML output works" ); 34 | 35 | SKIP: { 36 | skip "; is not supported anymore", 1; 37 | $t->get_ok("$path?ACTION=who_pumpkin;OF=YAML"); 38 | my $list_sem = YAML::Syck::Load( $t->content ); 39 | is_deeply( $list_sem, [qw/BAR FOO/], "YAML output works" ); 40 | } 41 | } 42 | }; 43 | 44 | done_testing; 45 | -------------------------------------------------------------------------------- /t/pause_2017/auth.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/lib"; 4 | use Test::PAUSE::Web; 5 | use HTTP::Status qw/:constants/; 6 | use utf8; 7 | 8 | Test::PAUSE::Web->setup; 9 | 10 | subtest 'basic' => sub { 11 | my $test = Test::PAUSE::Web->tests_for('user'); 12 | my ($path, $user) = @$test; 13 | my $t = Test::PAUSE::Web->new(user => $user); 14 | my $res = $t->get("$path");; 15 | ok $res->is_success; 16 | }; 17 | 18 | subtest 'lower case' => sub { 19 | my $test = Test::PAUSE::Web->tests_for('user'); 20 | my ($path, $user) = @$test; 21 | my $t = Test::PAUSE::Web->new(user => lc $user); 22 | my $res = $t->get("$path");; 23 | ok $res->is_success; 24 | }; 25 | 26 | subtest 'wrong password' => sub { 27 | my $test = Test::PAUSE::Web->tests_for('user'); 28 | my ($path, $user) = @$test; 29 | my $t = Test::PAUSE::Web->new(user => $user, pass => "WRONG PASS"); 30 | my $res = $t->get("$path");; 31 | ok !$res->is_success; 32 | is $res->code => HTTP_UNAUTHORIZED; 33 | }; 34 | 35 | subtest 'unknown user' => sub { 36 | my $test = Test::PAUSE::Web->tests_for('user'); 37 | my ($path, $user) = @$test; 38 | my $t = Test::PAUSE::Web->new(user => "UNKNOWN"); 39 | my $res = $t->get("$path");; 40 | ok !$res->is_success; 41 | is $res->code => HTTP_UNAUTHORIZED; 42 | }; 43 | 44 | subtest 'disallowed action for an anonymous user' => sub { 45 | my $test = Test::PAUSE::Web->tests_for('user'); 46 | my ($path, $user) = @$test; 47 | my $t = Test::PAUSE::Web->new; 48 | my $res = $t->get("/authenquery/?ACTION=add_user");; 49 | ok !$res->is_success; 50 | is $res->code => HTTP_FORBIDDEN; 51 | }; 52 | 53 | subtest 'disallowed action for a user' => sub { 54 | my $test = Test::PAUSE::Web->tests_for('user'); 55 | my ($path, $user) = @$test; 56 | my $t = Test::PAUSE::Web->new(user => $user); 57 | my $res = $t->get("/authenquery/?ACTION=add_user");; 58 | ok !$res->is_success; 59 | is $res->code => HTTP_FORBIDDEN; 60 | }; 61 | 62 | done_testing; 63 | -------------------------------------------------------------------------------- /t/pause_2017/logout.t: -------------------------------------------------------------------------------- 1 | use Mojo::Base -strict; 2 | use FindBin; 3 | use lib "$FindBin::Bin/lib"; 4 | use Test::PAUSE::Web; 5 | use utf8; 6 | use HTTP::Status qw/:constants/; 7 | 8 | Test::PAUSE::Web->setup; 9 | 10 | subtest 'logout 1: redirect with Cookie' => sub { 11 | for my $test (Test::PAUSE::Web->tests_for('user')) { 12 | my ($path, $user) = @$test; 13 | my $rand = rand 1; 14 | my $t = Test::PAUSE::Web->new(user => $user); 15 | $t->get_ok("$path"); 16 | my $res = $t->get("$path?logout=1$rand"); 17 | is $res->code => HTTP_UNAUTHORIZED; 18 | } 19 | }; 20 | 21 | subtest 'logout 2: redirect to Badname:Badpass@Server URL' => sub { 22 | plan skip_all => "WWW::Mechanize/LWP::UserAgent currently ignores userinfo"; 23 | for my $test (Test::PAUSE::Web->tests_for('user')) { 24 | my ($path, $user) = @$test; 25 | my $rand = rand 1; 26 | my $t = Test::PAUSE::Web->new(user => $user); 27 | $t->get_ok("$path"); 28 | my $res = $t->get("$path?logout=2$rand"); 29 | is $res->code => HTTP_UNAUTHORIZED; 30 | } 31 | }; 32 | 33 | subtest 'logout 3: Quick direct 401' => sub { 34 | for my $test (Test::PAUSE::Web->tests_for('user')) { 35 | my ($path, $user) = @$test; 36 | my $rand = rand 1; 37 | my $t = Test::PAUSE::Web->new(user => $user); 38 | $t->get_ok("$path"); 39 | my $res = $t->get("$path?logout=3$rand"); 40 | is $res->code => HTTP_UNAUTHORIZED; 41 | } 42 | }; 43 | 44 | done_testing; 45 | -------------------------------------------------------------------------------- /t/perlcriticrc: -------------------------------------------------------------------------------- 1 | severity = 3 2 | only = 1 3 | force = 0 4 | verbose = 4 5 | top = 50 6 | theme = bugs || complexity 7 | include = ClassHierarchies 8 | #exclude = Variables Modules::RequirePackage #Space-delimited list 9 | #criticism-fatal = 1 #Zero or One 10 | #color = 1 #Zero or One 11 | # 12 | #[Perl::Critic::Policy::Category::PolicyName] 13 | #severity = 1 14 | #set_themes = foo bar 15 | #add_themes = baz 16 | #maximum_violations_per_document = 57 17 | #arg1 = value1 18 | #arg2 = value2 19 | 20 | [Subroutines::ProhibitExcessComplexity] 21 | max_mccabe = 76 22 | -------------------------------------------------------------------------------- /t/privatelib/PrivatePAUSE.pm: -------------------------------------------------------------------------------- 1 | package PrivatePAUSE; 2 | # Stub to hush warnings 3 | 1; -------------------------------------------------------------------------------- /t/programs.t: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | use Test::More; 4 | use File::Spec; 5 | use lib 't/lib'; 6 | use TestSetup; 7 | 8 | sub _f ($) {File::Spec->catfile(split /\//, shift);} 9 | 10 | my @s = qw( 11 | bin/paused 12 | cron/mldistwatch 13 | cron/cleanup-incoming.pl 14 | ); 15 | for my $dir (qw(bin cron)) { 16 | opendir my $dh, $dir or die "Could not opendir $dir: $!"; 17 | for my $d (readdir $dh) { 18 | next unless $d =~ /\.pl$/; 19 | push @s, "$dir/$d"; 20 | } 21 | } 22 | 23 | my $tests_per_loop = 1; 24 | my $plan = scalar @s * $tests_per_loop; 25 | plan tests => $plan; 26 | 27 | $ENV{PAUSE_PAUSED_LOG_FILE} = "/dev/null"; 28 | 29 | my $devnull = File::Spec->devnull; 30 | for my $s (1..@s) { 31 | my $script = _f($s[$s-1]); 32 | open my $fh, "-|", qq{"$^X" "-Ilib" "-Iblib/privatelib" "-cw" "$script" 2>&1} or die "could not fork: $!"; 33 | while (<$fh>) { 34 | next if /syntax OK/; 35 | diag $_; 36 | } 37 | my $ret = close $fh; 38 | ok 1==$ret, "$script:-c:$ret"; 39 | } 40 | 41 | __END__ 42 | 43 | -------------------------------------------------------------------------------- /t/recent.t: -------------------------------------------------------------------------------- 1 | use Test::More tests=>1; 2 | use lib 't/lib'; 3 | use File::Rsync::Mirror::Recentfile; 4 | my $rf = File::Rsync::Mirror::Recentfile->new 5 | ( 6 | canonize => "naive_path_normalize", 7 | localroot => "t", 8 | interval => q(2d), 9 | ); 10 | my $recent_events = $rf->recent_events; 11 | is 377, scalar @$recent_events, "length of testfile is 377"; 12 | 13 | __END__ 14 | 15 | # Local Variables: 16 | # mode: cperl 17 | # cperl-indent-level: 4 18 | # End: 19 | -------------------------------------------------------------------------------- /t/staging/Hash-RenameKey-0.02.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/t/staging/Hash-RenameKey-0.02.tar.gz -------------------------------------------------------------------------------- /t/staging/Hash-RenameKey-trailinggarbage-0.02.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/t/staging/Hash-RenameKey-trailinggarbage-0.02.tar.gz -------------------------------------------------------------------------------- /t/staging/Hash-RenameKey-worldwriteable-0.02.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andk/pause/14e087c9d8a97830d28b8c232b22f07b9afcb1e5/t/staging/Hash-RenameKey-worldwriteable-0.02.tar.gz -------------------------------------------------------------------------------- /t/submodule-firstcome.t: -------------------------------------------------------------------------------- 1 | # The header has been lifted from mldist-misc.t untouched 2 | use strict; 3 | use warnings; 4 | 5 | use 5.10.1; 6 | use lib 't/lib'; 7 | use lib 't/privatelib'; # Stub PrivatePAUSE 8 | 9 | use File::Spec; 10 | use PAUSE; 11 | use PAUSE::TestPAUSE; 12 | 13 | use Test::More; 14 | 15 | # Contains Acme-Playpen-2.00 by NEILB which includes: 16 | # Acme::Playpen 17 | # Acme::Playpen::NonIndexedFile 18 | # Acme::Playpen::NonIndexedPackage 19 | # Acme::Playpen::Utilities 20 | # Acme::STUDY::PERL 21 | my $corpus = 'corpus/mld/submodule-firstcome/authors'; 22 | 23 | # However, Acme::Study::Perl belongs to ANDK. 24 | my @existing_permissions = map { 25 | "INSERT INTO $_ (package, lc_package, userid) VALUES ('Acme::Study::Perl','acme::study::perl','ANDK')" 26 | } qw/primeur perms/; 27 | 28 | # ... and therefore, we should only index Acme::Playpen::* 29 | my $expected_package_list = [ 30 | { package => 'Acme::Playpen', version => '0.20' }, 31 | { package => 'Acme::Playpen::Utilities', version => 'undef' }, 32 | { package => 'Acme::Playpen::_common', version => 'undef' }, 33 | { package => 'Acme::odometer', version => '0.20' }, 34 | ### { package => 'Acme::STUDY::PERL', version => '2.00' }, ### WRONG 35 | ]; 36 | 37 | # Instantiate a new TestPAUSE 38 | my $pause = PAUSE::TestPAUSE->init_new; 39 | 40 | # Create the modules database, and add the existing permissions 41 | { 42 | my $db_file = File::Spec->catfile( $pause->db_root, 'mod.sqlite' ); 43 | my $dbh = DBI->connect( 44 | 'dbi:SQLite:dbname=' 45 | . $db_file, 46 | undef, 47 | undef, 48 | ) or die "can't connect to db at $db_file: $DBI::errstr"; 49 | 50 | for my $perm (@existing_permissions) { 51 | $dbh->do($perm) or die "Couldn't add package permissions [$perm]"; 52 | } 53 | 54 | } 55 | 56 | note("Indexing the corpus at [$corpus]"); 57 | $pause->import_author_root( $corpus ); 58 | my $result = $pause->test_reindex; 59 | 60 | # Check the results using Rik's convenience method 61 | $result->package_list_ok( $expected_package_list ); 62 | 63 | $result->email_ok( 64 | [ 65 | { subject => 'Failed: PAUSE indexer report NEILB/Acme-Playpen-2.00.tar.gz' }, 66 | { subject => 'PAUSE upload indexing error' }, 67 | ], 68 | ); 69 | 70 | done_testing; 71 | 72 | # Local Variables: 73 | # mode: cperl 74 | # cperl-indent-level: 4 75 | # End: 76 | --------------------------------------------------------------------------------