Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use Perl program written by moritz++ as cross-platform way of creatin…

…g sha256 checksum on release tarballs.
  • Loading branch information...
commit 6989471ac7929bd6655c2d85c4cd8070b9da1c80 1 parent 1f9923a
@jkeenan jkeenan authored
View
2  MANIFEST
@@ -10,7 +10,6 @@
CREDITS [main]doc
ChangeLog []
Configure.pl []
-DEVELOPING []
DONORS.pod [main]doc
LICENSE [main]doc
MANIFEST []
@@ -2200,6 +2199,7 @@ tools/release/gen_release_info.pl []
tools/release/inc_ver.pir []
tools/release/release.json []
tools/release/releasecheck.pl []
+tools/release/sha256sum.pl []
tools/release/templates.json []
tools/release/update_version.pl []
# Local variables:
View
7 config/gen/makefiles/root.in
@@ -82,7 +82,6 @@ RM_F = @rm_f@
RM_RF = @rm_rf@
TOUCH = @touch@
TAR = @tar@
-SHA256SUM = @sha256sum@
AR_CR = @ar@ @arflags@
RANLIB = @ranlib@
YACC = @yacc@
@@ -2942,8 +2941,10 @@ release : MANIFEST MANIFEST.generated
$(TAR) -zcv -T - -f parrot-$(VERSION).tar.gz
$(PERL) -lane 'print"parrot-$(VERSION)/$$F[0]"unless!length||/#/' \
MANIFEST | $(TAR) -jcv -T - -f parrot-$(VERSION).tar.bz2
- $(SHA256SUM) parrot-$(VERSION).tar.gz > parrot-$(VERSION).tar.gz.sha256
- $(SHA256SUM) parrot-$(VERSION).tar.bz2 > parrot-$(VERSION).tar.bz2.sha256
+ $(PERL) $(RELEASE_TOOLS_DIR)/sha256sum.pl \
+ parrot-$(VERSION).tar.gz > parrot-$(VERSION).tar.gz.sha256
+ $(PERL) $(RELEASE_TOOLS_DIR)/sha256sum.pl \
+ parrot-$(VERSION).tar.bz2 > parrot-$(VERSION).tar.bz2.sha256
mv MANIFEST.real MANIFEST
rm parrot-$(VERSION)
View
7 config/init/defaults.pm
@@ -204,13 +204,8 @@ sub runstep {
rm_rf => '$(PERL) -MExtUtils::Command -e rm_rf',
touch => '$(PERL) -MExtUtils::Command -e touch',
- # tar and sha256sum are currently used only in 'make release'.
- # 'sha256sum' is a Linux command-line utility; in the OS-specific
- # 'hints' files we'll supply substitutes on other OSes as we can
- # locate them.
-
+ # tar is currently used only in 'make release'.
tar => which('tar') || '',
- sha256sum => which('sha256sum') || '',
ar => $Config{ar},
arflags => 'cr',
View
5 config/init/hints/darwin.pm
@@ -82,11 +82,6 @@ sub runstep {
memalign => 'some_memalign',
has_dynamic_linking => 1,
- # 'shasum' is a command-line utility (implemented in Perl) which
- # is distributed with Mac OS X. See 'man shasum'.
- sha256sum => 'shasum -a 256' ||
- $conf->data->get('sha256sum'),
-
# TT #344: When built against a dynamic libparrot,
# installable_parrot records the path to the blib version
# of the library.
View
1  config/init/hints/freebsd.pm
@@ -39,7 +39,6 @@ sub runstep {
libparrot_shared_alias => "libparrot$share_ext",
libparrot_soname => "-Wl,-soname=libparrot$share_ext.$version",
osvers => $osvers,
- sha256sum => 'sha256' || $conf->data->get('sha256sum'),
);
}
View
1  config/init/hints/openbsd.pm
@@ -37,7 +37,6 @@ sub runstep {
libparrot_shared => "libparrot$share_ext.$version",
libparrot_shared_alias => "libparrot$share_ext",
libparrot_soname => "-Wl,-soname=libparrot$share_ext.$version",
- sha256sum => 'sha256' || $conf->data->get('sha256sum'),
);
if ( ( split( m/-/, $conf->data->get('archname_provisional'), 2 ) )[0] eq 'powerpc' ) {
View
12 tools/release/sha256sum.pl
@@ -0,0 +1,12 @@
+# perl
+use strict;
+use warnings;
+use Digest;
+
+my $t = shift(@ARGV);
+my $d = Digest->new('SHA-256');
+open my $f, '<:raw', $t or die "Cannot open file '$t' for reading: $t";
+binmode $f;
+$d->addfile($f);
+close $f;
+print $d->hexdigest, ' ', $t, "\n";
Please sign in to comment.
Something went wrong with that request. Please try again.