Ticket #2183 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

sha256 problem encountered during 'make release'

Reported by: coke Owned by: jkeenan
Priority: normal Milestone:
Component: install Version: 3.7.0
Severity: medium Keywords:
Cc: coke moritz Language:
Patch status: applied Platform:

Description

This ticket moves into Trac an issue originally reported by coke on IRC during the course of preparing the 3.7 release on Aug 15-16 2011. coke reported being unable to do make release on Mac OS X due to the requirement to create sha256 checksums of the release tarballs.

Discussion continued on  parrot-dev. Since this is a bug that we will want to be able to reference in the future, I am moving the discussion into Trac.

I have opened the tar_shasum branch in git to explore possible solutions to this problem.

Thank you very much.

kid51

Change History

follow-up: ↓ 2   Changed 3 years ago by jkeenan

  • status changed from new to assigned

In  commit 6989471ac7, I implement a solution proposed on parrot-dev by moritz++. This solution takes advantage of the fact that the Digest CPAN library is part of the Perl 5 core distribution. This permits a cross-platform solution.

Please review. If this is satisfactory and no one objects, I will merge the tar_shasum branch into master next Monday or Tuesday.

Thank you very much.

kid51

in reply to: ↑ 1   Changed 3 years ago by jkeenan

  • patch set to new

Replying to jkeenan:

Please review. If this is satisfactory and no one objects, I will merge the tar_shasum branch into master next Monday or Tuesday.

I've tested this with good results on Linux/i386 and Darwin/PPC. Test runs on additional platforms would be very welcome.

kid51

follow-up: ↓ 4   Changed 3 years ago by cotto

Alternately we could use something like this, which gives the same result as the system tool. It's not maximally lazy, but using our own tools is worthwhile where it won't cause too much additional pain.

.sub main :main
    .param pmc argv
    .local pmc filename
    .local string file_data
    .local pmc fh

    filename = argv[1]
    fh = new ['FileHandle']
    fh.'encoding'('binary')
    file_data = fh.'readall'(filename)

    load_bytecode "Digest/sha256.pbc"
    $P0 = 'sha256sum'(file_data)
    $S0 = 'sha256_hex'($P0)
    print $S0
    print "  "
    say filename
.end

in reply to: ↑ 3   Changed 3 years ago by jkeenan

Replying to cotto:

...using our own tools is worthwhile where it won't cause too much additional pain.

Could you work this into a full patch and apply it in the tar_shasum branch so we could test it out? That would entail (a) making your parrot snippet into a file; (b) invoking parrot on that file in config/gen/makefiles/root.in; (c) deleting the Perl 5 program I worked up from moritz's contribution.

Thank you very much.

kid51

follow-up: ↓ 6   Changed 3 years ago by cotto

I took a shot at that. It turns out that a PIR-based sha256 sum of a 3.9MB release tarball takes more than 2 minutes. I'm going to call that a non-starter for the time being.

in reply to: ↑ 5   Changed 3 years ago by jkeenan

  • patch changed from new to applied

Replying to cotto:

I took a shot at that. It turns out that a PIR-based sha256 sum of a 3.9MB release tarball takes more than 2 minutes. I'm going to call that a non-starter for the time being.

That being the case, I'm merging in the tar_shasum branch now. Please report any problems.

Thank you very much.

kid51

follow-up: ↓ 8   Changed 3 years ago by coke

On Sun, Aug 21, 2011 at 9:36 PM, Parrot <parrot-tickets@lists.parrot.org> wrote:
> #2183: sha256 problem encountered during 'make release'
> ---------------------+------------------------------------------------------
>  Reporter:  coke     |       Owner:  jkeenan
>     Type:  bug      |      Status:  assigned
>  Priority:  normal   |   Milestone:
> Component:  install  |     Version:  3.7.0
>  Severity:  medium   |    Keywords:
>     Lang:           |       Patch:  applied
>  Platform:           |
> ---------------------+------------------------------------------------------
> Changes (by jkeenan):
>
>  * patch:  new => applied
>
>
> Comment:
>
>  Replying to [comment:5 cotto]:
>  > I took a shot at that.  It turns out that a PIR-based sha256 sum of a
>  3.9MB release tarball takes more than 2 minutes.  I'm going to call that a
>  non-starter for the time being.
>
>  That being the case, I'm merging in the ''tar_shasum'' branch now.  Please
>  report any problems.
>
>  Thank you very much.
>
>  kid51
>
> --
> Ticket URL: <https://trac.parrot.org/parrot/ticket/2183#comment:6>
> Parrot <https://trac.parrot.org/parrot/>
> Parrot Development
>

Can we have that be the fallback method, so that "nmake release" might
work on windows, albeit slowly?

-- 
Will "Coke" Coleda

in reply to: ↑ 7   Changed 3 years ago by jkeenan

Replying to coke:

Can we have that be the fallback method, so that "nmake release" might work on windows, albeit slowly?

The method finally used in the branch was to implement Moritz's solution of using functionality from the Perl 5 core module Digest. Hence, it should work on any of our supported OSes, including Windows.

The original complaint was about a problem on Mac OS X. This has been fixed. If you're having a problem with 'nmake' on Windows, and if the fix that I merged in isn't working there, then can you provide more details (as that might be due to a separate problem)?

Thank you very much.

kid51

  Changed 3 years ago by cotto

  • status changed from assigned to closed
  • resolution set to fixed

I took a shot at this, but it looks like make release is broken on windows/msvc. I cleaned up release_check to use $(MAKE) instead of assuming make, but I don't have the tuits to fix this any further right now.

However, tools/release/sha256sum.pl seems to work just fine on windows, so I'll mark this this ticket as fixed.

Note: See TracTickets for help on using tickets.