Skip to content

Commit 1e8d148

Browse files
authored
Merge pull request #42 from timlegge/dist-zilla
Updates for Dist::Zilla and Related Items
2 parents 8469f46 + 798c7f4 commit 1e8d148

File tree

22 files changed

+437
-2490
lines changed

22 files changed

+437
-2490
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ MYMETA.json
44
MYMETA.yml
55
Makefile
66
pm_to_blib
7+
Module-Signature-*
8+
.build
9+
Release*

.mailmap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Audrey Tang <[email protected]>
2+
Baldur Kristinsson <[email protected]>
3+
Christian Loos <[email protected]>
4+
David E. Weekly <[email protected]>
5+
Graham Knop <[email protected]>
6+
Karen Etheridge <[email protected]>
7+
Kenichi Ishigaki <[email protected]>
8+
Michael G. Schwern <[email protected]>
9+
Mohammad S Anwar <[email protected]>
10+
Niklas Holm <[email protected]>
11+
12+
Shoichi Kaji <[email protected]>
13+
Timothy Legge <[email protected]>
14+
Wes Young <[email protected]>
15+

Changes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
* Fixes RT#166901: Suspicious fail on signature file with an unexpected empty line
44

5-
[Changes for 0.89 - Fri Sep 13 21:56:06 ADT 2024]
5+
[Changes for 0.89 - Fri Sep 13 21:56:06 ADT 2024]
66

77
* Replace keyserver with keyserver.ubuntu.com (haarg)
88

@@ -238,7 +238,7 @@ Fix various issues reported by John Lightsey:
238238
* Move under SVK version control management; ditch keyword tags.
239239

240240
* Michael Schwern pointed out that during development, the
241-
"signature.t" file would keep failing.
241+
"signature.t" file would keep failing.
242242

243243
* Documented how to generate SIGNATURE files as part of "make dist",
244244
for Module::Install, ExtUtils::MakeMaker and Module::Build users .
@@ -401,7 +401,7 @@ Fix various issues reported by John Lightsey:
401401
* Warn about potential 'Makefile' exploit as pointed out by Tels.
402402
Document pending.
403403

404-
* Bugfix for incorrect 'MALFORMED' response to signatures made from
404+
* Bugfix for incorrect 'MALFORMED' response to signatures made from
405405
older versions of GnuPG, as reported by Tels.
406406

407407
[Changes for 0.18 - 2002-11-04]

META.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

Makefile.PL

Lines changed: 84 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -1,164 +1,88 @@
11
use strict;
2-
use FindBin '$Bin';
3-
use lib $Bin;
4-
use inc::Module::Install 0.92;
5-
6-
$|++;
7-
8-
name 'Module-Signature';
9-
license 'unrestricted';
10-
all_from 'lib/Module/Signature.pm';
11-
repository 'http://github.com/audreyt/module-signature';
12-
install_script 'script/cpansign';
13-
build_requires 'Test::More', 0, 'IPC::Run', 0;
14-
requires 'File::Temp';
15-
16-
# clean generated test files
17-
clean_files(q{"t/test-dat*"});
18-
19-
# On Win32 (excluding cygwin) we know that IO::Socket::INET,
20-
# which is needed for keyserver stuff, doesn't work. In fact
21-
# it potentially hangs forever. So bail out with a N/A on
22-
# Win32.
23-
if ( $^O eq 'MSWin32' and 0 ) {
24-
print "Keyserver behaviour is dangerous unreliable on Win32\n";
25-
print "Not installing on this platform.\n";
26-
exit(255);
27-
} else {
28-
requires 'IO::Socket::INET' => 0;
29-
}
30-
31-
# We will need something to handle SHA1/256
32-
unless (
33-
can_use('Digest::SHA') or
34-
can_use('Digest::SHA::PurePerl') or
35-
(can_use('Digest::SHA1') and can_use('Digest::SHA256'))
36-
) {
37-
# Nothing installed, we need to install a digest module
38-
if ( can_cc() ) {
39-
requires 'Digest::SHA';
40-
} else {
41-
requires 'Digest::SHA::PurePerl';
42-
}
43-
}
44-
45-
# Is openpgp currently installed
46-
if ( can_use('Crypt::OpenPGP') ) {
47-
# Crypt::OpenPGP installed/available, continue on...
48-
} elsif ( my $gpg = locate_gpg() ) {
49-
# We SHOULD have gpg, double-check formally
50-
requires_external_bin $gpg;
51-
} elsif ( can_cc() and $ENV{AUTOMATED_TESTING} ) {
52-
# Dive headlong into a full Crypt::OpenPGP install.
53-
requires('Crypt::OpenPGP');
54-
} else {
55-
# Ask the user what to do
56-
ask_user();
57-
}
58-
59-
unless ( can_run('diff') ) {
60-
# We know Text::Diff fails on Cygwin (for now)
61-
if ( $^O ne 'Cygwin' ) {
62-
requires 'Algorithm::Diff';
63-
requires 'Text::Diff';
64-
}
2+
use warnings;
3+
4+
use 5.010;
5+
6+
use ExtUtils::MakeMaker;
7+
8+
my %WriteMakefileArgs = (
9+
"ABSTRACT" => "Module signature file manipulation",
10+
"AUTHOR" => "Audrey Tang <cpan\@audreyt.org>",
11+
"CONFIGURE_REQUIRES" => {
12+
"ExtUtils::MakeMaker" => 0
13+
},
14+
"DISTNAME" => "Module-Signature",
15+
"LICENSE" => "perl",
16+
"MIN_PERL_VERSION" => "5.010",
17+
"NAME" => "Module::Signature",
18+
"PREREQ_PM" => {
19+
"Crypt::OpenPGP" => 0,
20+
"Crypt::OpenPGP::KeyServer" => 0,
21+
"Exporter" => 0,
22+
"ExtUtils::Manifest" => 0,
23+
"File::Spec" => 0,
24+
"File::Temp" => 0,
25+
"IO::Socket::INET" => 0,
26+
"Text::Diff" => 0,
27+
"constant" => 0,
28+
"strict" => 0,
29+
"vars" => 0,
30+
"version" => 0,
31+
"warnings" => 0
32+
},
33+
"TEST_REQUIRES" => {
34+
"Data::Dumper" => 0,
35+
"File::Basename" => 0,
36+
"File::Path" => 0,
37+
"FindBin" => 0,
38+
"Getopt::Long" => 0,
39+
"IPC::Run" => 0,
40+
"Pod::Usage" => 0,
41+
"Socket" => 0,
42+
"Test::More" => 0,
43+
"lib" => 0
44+
},
45+
"VERSION" => "0.90",
46+
"test" => {
47+
"TESTS" => "t/*.t"
48+
}
49+
);
50+
51+
52+
my %FallbackPrereqs = (
53+
"Crypt::OpenPGP" => 0,
54+
"Crypt::OpenPGP::KeyServer" => 0,
55+
"Data::Dumper" => 0,
56+
"Exporter" => 0,
57+
"ExtUtils::Manifest" => 0,
58+
"File::Basename" => 0,
59+
"File::Path" => 0,
60+
"File::Spec" => 0,
61+
"File::Temp" => 0,
62+
"FindBin" => 0,
63+
"Getopt::Long" => 0,
64+
"IO::Socket::INET" => 0,
65+
"IPC::Run" => 0,
66+
"Pod::Usage" => 0,
67+
"Socket" => 0,
68+
"Test::More" => 0,
69+
"Text::Diff" => 0,
70+
"constant" => 0,
71+
"lib" => 0,
72+
"strict" => 0,
73+
"vars" => 0,
74+
"version" => 0,
75+
"warnings" => 0
76+
);
77+
78+
79+
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
80+
delete $WriteMakefileArgs{TEST_REQUIRES};
81+
delete $WriteMakefileArgs{BUILD_REQUIRES};
82+
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
6583
}
6684

67-
sign; WriteAll;
68-
69-
70-
71-
72-
73-
#####################################################################
74-
# Support Functions
75-
76-
sub locate_gpg {
77-
print "Looking for GNU Privacy Guard (gpg), a cryptographic signature tool...\n";
78-
79-
my ($gpg, $gpg_path);
80-
for my $gpg_bin ('gpg', 'gpg2', 'gnupg', 'gnupg2') {
81-
$gpg_path = can_run($gpg_bin);
82-
next unless $gpg_path;
83-
next unless `$gpg_bin --version` =~ /GnuPG/;
84-
next unless defined `$gpg_bin --list-public-keys`;
85-
86-
$gpg = $gpg_bin;
87-
last;
88-
}
89-
unless ( $gpg ) {
90-
print "gpg not found.\n";
91-
return;
92-
}
93-
94-
print "GnuPG found ($gpg_path).\n";
95-
96-
return 1 if grep { /^--installdeps/} @ARGV;
97-
98-
if ( prompt("Import PAUSE and author keys to GnuPG?", 'y' ) =~ /^y/i) {
99-
print 'Importing... ';
100-
system $gpg, '--quiet', '--import', qw[ AUDREYT2018.pub ANDK2020.pub PAUSE2022.pub NIKLASHOLM2018.pub TIMLEGGE2024.pub ];
101-
print "done.\n";
102-
}
103-
104-
return $gpg;
105-
}
106-
107-
sub ask_user {
108-
109-
# Defined the prompt messages
110-
my $message1 = <<'END_MESSAGE';
111-
112-
Could not auto-detect a signature utility on your system.
113-
114-
What do you want me to do?
115-
116-
1) Let you install GnuPG manually while I'm waiting for your answer;
117-
it is available at http://www.gnupg.org/download/ or may be available
118-
from your platforms packaging system (for Open Source platforms).
119-
120-
END_MESSAGE
121-
122-
my $message2 = <<'END_MESSAGE';
123-
124-
2) Automatically install Crypt::OpenPGP and the 20 modules it requires
125-
from CPAN, which will give the same functionality as GnuPG.
126-
127-
END_MESSAGE
128-
129-
# Present the options
130-
print $message1;
131-
132-
my $option3 = 2;
133-
if ( can_cc() ) {
134-
$option3 = 3;
135-
print $message2;
136-
}
137-
138-
print <<"END_MESSAGE";
139-
140-
$option3) Forget this cryptographic signature stuff for now.
141-
142-
END_MESSAGE
143-
144-
my $choice;
145-
foreach ( 1 .. 3 ) {
146-
$choice = prompt("Your choice:", 3) || 3;
147-
last if $choice =~ /^[123]$/;
148-
print "Sorry, I cannot understand '$choice'.\n"
149-
}
150-
151-
if ( $choice == 1 ) {
152-
# They claim to have installed gpg
153-
requires_external_bin 'gpg';
154-
} elsif ( $choice == 2 and $option3 == 3 ) {
155-
# They want to install Crypt::OpenPGP
156-
requires('Crypt::OpenPGP');
157-
} else {
158-
# Forget about it...
159-
print "Module::Signature is not wanted on this host.\n";
160-
exit(0);
161-
}
162-
}
85+
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
86+
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
16387

164-
__END__
88+
WriteMakefile(%WriteMakefileArgs);

README

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
NAME
22
Module::Signature - Module signature file manipulation
33

4+
VERSION
5+
version 0.90
6+
47
SYNOPSIS
58
As a shell command:
69

@@ -50,6 +53,15 @@ DESCRIPTION
5053
module authors are strongly encouraged to regenerate their SIGNATURE
5154
files. Users verifying old SHA1 signature files will receive a warning.
5255

56+
verify (...)
57+
verify a signature file
58+
59+
sign (...)
60+
make signature file - overwrites existing one
61+
62+
NAME
63+
Module::Signature - Module signature file manipulation
64+
5365
VARIABLES
5466
No package variables are exported by default.
5567

@@ -269,10 +281,19 @@ LICENSE
269281
This work is under a CC0 1.0 Universal License, although a portion of
270282
the documentation (as detailed above) is under the Perl license.
271283

272-
To the extent possible under law, 唐鳳 has waived all copyright and
284+
To the extent possible under law, 唐鳳 has waived all copyright and
273285
related or neighboring rights to Module-Signature.
274286

275287
This work is published from Taiwan.
276288

277289
<http://creativecommons.org/publicdomain/zero/1.0>
278290

291+
AUTHOR
292+
Audrey Tang <[email protected]>
293+
294+
COPYRIGHT AND LICENSE
295+
This software is copyright (c) 2024 by waved.
296+
297+
This is free software; you can redistribute it and/or modify it under
298+
the same terms as the Perl 5 programming language system itself.
299+

0 commit comments

Comments
 (0)