Repository: spack/spack

Issue:
Failed to fetch OpenFoam source code
<!-- Explain, in a clear and concise way, the command you ran and the result you were trying to achieve.
Example: "I ran `spack find` to list all the installed packages and ..." -->

OpenFoam source code fetch url gets redirected because of sourceforge.

The link <https://sourceforge.net/projects/openfoam/files/v2006/OpenFOAM-v2006.tgz> will be led to

![image](https://user-images.githubusercontent.com/19409802/87025610-35ba8100-c20d-11ea-9e96-510d5ba30cce.png)

### Steps to reproduce the issue

```console
$ spack mirror create openfoam
```

### Error Message

<!-- If Spack reported an error, provide the error message. If it did not report an error but the output appears incorrect, provide the incorrect output. If there was no error message and no output but the result is incorrect, describe how it does not match what you expect. -->
```console
==> Adding package openfoam@2006 to mirror
==> openfoam: 2006
==> Fetching https://develop.openfoam.com/Development/openfoam/commit/8831dfc58b0295d0d301a78341dd6f4599073d45.patch
####################################################################################################################################################################################################### 100.0%
==> Already downloaded /tmp/root/spack-stage/spack-stage-jwd648ct/8831dfc58b0295d0d301a78341dd6f4599073d45.patch
==> Already downloaded /tmp/root/spack-stage/spack-stage-jwd648ct/8831dfc58b0295d0d301a78341dd6f4599073d45.patch
==> Warning: Error while fetching openfoam@2006
  sha256 checksum failed for /tmp/root/spack-stage/spack-stage-jwd648ct/8831dfc58b0295d0d301a78341dd6f4599073d45.patch

```

### Information on your system

<!-- Please include the output of `spack debug report` -->

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

### Additional information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [ ] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x] I have searched the issues of this repo and believe this is not a duplicate
- [ ] I have run the failing commands in debug mode and reported the output

<!-- We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!

If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.

Other than that, thanks for taking the time to contribute to Spack! -->



Discussion:
@olesenm 
Not sure what is going on here. Are you able to fetch one of the older versions? Just to identify where the problem is
Looks like the sha might have changed somewhere along the way. 
> Looks like the sha might have changed somewhere along the way.

Yes, the hash of `8831dfc58b0295d0d301a78341dd6f4599073d45.patch` changed to `531146be868dd0cda70c1cf12a22110a38a30fd93b5ada6234be3d6c9256c6cf`

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/openfoam/package.py b/var/spack/repos/builtin/packages/openfoam/package.py
--- a/var/spack/repos/builtin/packages/openfoam/package.py
+++ b/var/spack/repos/builtin/packages/openfoam/package.py
@@ -349,7 +349,7 @@ class Openfoam(Package):
     # kahip patch (wmake)
     patch('https://develop.openfoam.com/Development/openfoam/commit/8831dfc58b0295d0d301a78341dd6f4599073d45.patch',
           when='@1806',
-          sha256='21f1ab68c82dfa41ed1a4439427c94c43ddda02c84175c30da623d905d3e5d61'
+          sha256='531146be868dd0cda70c1cf12a22110a38a30fd93b5ada6234be3d6c9256c6cf'
           )
 
     # Some user config settings


Test patch: