App-Fetchware

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
1.013     2014-09-06 22:01:01-04:00 America/New_York
    - Fixed dozens of CPAN Tester FAIL reports. These reports FAILed mostly
      beause they were run under a smoker, which is a different environment, then
      I test Fetchware under.
        - Fixed the upgrade tests actually using the users own fetchware package
          path. Now a temp file is used instead.
        - Switch use of $^X to $Config{perlpath}, which solves some bugs in some
          smoker configurations.
        - Fixed a hilarious bug due to localizations. I used a direct string
          comparison where $! was in the string, and I guess under different
          locales you can get languages other than english to come from using $!
          in a string.
 
1.012     2014-09-05 21:23:55-04:00 America/New_York
    - Fixed botched use of $ENV{AUTOMATED_TESTING} to skip the interactive new
      command tests.
    - Fixed last of my use of smartmatch since its sadly been marked
      experimental.
 
1.011     2014-09-05 00:59:30-04:00 America/New_York

lib/App/Fetchware.pm  view on Meta::CPAN

7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
This extension mechanism is also very easy for Perl programmers, because you're
basically I<subclassing> App::Fetchware, only you do it using
L<App::Fetchware::ExportAPI> and L<App::Fetchware::CreateConfigOptions>. See
section L<Implement your fetchware extension.> for full details.
 
=head2 How do I fix the verification failed error.
 
Fetchware is designed to always attempt to verify the software archives it
downloads even if you failed to configure fetchware's verification settings. It
will try to guess what those setting should be using simple heuristics. First it
will try gpg verificaton, then sha1 verification, and finally md5 verification.
If all fail, then fetchware exit failure with an appropriate error message.
 
When you get this error message
L<read fetchware's documentation on how to set this up|/4. Add mandatory verification settings>.
 
=head2 How do I make fetchware log to a file instead of STDOUT?
 
You can't fetchware does not have any log file support. However, you can simply
redirect STDOUT to a file to make your shell redirect STDOUT to a file for you.

lib/App/Fetchware/Util.pm  view on Meta::CPAN

1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
 
{ # Bareblock just for the $MAGIC_NUMBER.
    # Determine $front_magic
    my $front_magic;
    $front_magic = int(rand(8128389023));
    # For no particular reason convert the random integer into hex, because I
    # never  store something in decimal and then exact same thing in hex.
    $front_magic = $front_magic . sprintf("%x", $front_magic);
    # Run srand() again to change random number generator between rand() calls.
    # Not really necessary, but should make it harder to guess correct magic
    # numbers.
    srand(time());
    # Same a $front_magic.
    my $back_magic = int(rand(986487516));
    # Octal this time :) for no real reason.
    $back_magic = $back_magic . sprintf("%o", $back_magic);
    my $MAGIC_NUMBER = $front_magic
        . 'MAGIC_NUMBER_REPLACING_NEWLINE'
        . $back_magic;

t/App-Fetchware-verify.t  view on Meta::CPAN

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
};
 
 
subtest 'test verify()' => sub {
    skip_all_unless_release_testing();
 
    # test verify_method
    # test gpg verify_method
    # test sha1 verify_method
    # test md5 verify_method
    # Specify a DownloadURL to test some gpg_verify() guessing magic.
    for my $verify_method (qw(gpg sha md5)) {
        config_replace('verify_method', "$verify_method");
        eval {verify($download_path, $package_path)};
 
        unless ($@) {
            pass("checked verify() verify_method $verify_method");
        } else {
            fail("checked verify() verify_method $verify_method");
        }
    }



( run in 0.779 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )