Bug 1464343 - Go crypto package is broken due to corrupted file /usr/lib/golang/src/crypto/crypto.go
Summary: Go crypto package is broken due to corrupted file /usr/lib/golang/src/crypto/...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: golang
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Vincent Batts
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-23 07:31 UTC by Gerard Braad
Modified: 2017-06-23 08:25 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-23 08:09:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gerard Braad 2017-06-23 07:31:59 UTC
Description of problem:
Unable to compile when using the package crypto and/or md5


Version-Release number of selected component (if applicable):
1.7.6


How reproducible:
Consistent. Compiling Minishift will fail.


Steps to Reproduce:
1. dnf install -y golang glide
2. git clone https://github.com/minishift/minishift.git
3. make

Actual results:
https://github.com/minishift/minishift/pull/1017#issuecomment-310588483
/usr/lib/golang/src/crypto/crypto.go:1:1: expected 'package', found 'STRING' ""

Expected results:
Successful build. 


Additional info:
Build worked on 1.7.5, but started to fail after update.
As you can see herehttps://gist.github.com/gbraad/9dfa2b467ebcb60d987871ad2fc2f02c#file-crypto-go-L29, the file does not have a package and ends prematurely.

Comment 1 Gerard Braad 2017-06-23 07:56:57 UTC
just now did a clean install from a container:

```
$ docker run -it fedora:25 bash
# dnf install -y golang -y
# vi /usr/lib/golang/src/crypto/crypto.go
```

and this seems to be OK.

Comment 2 Gerard Braad 2017-06-23 08:04:48 UTC
On the original host occured AFTER doing a `dnf update`. updating golang or golang-bin did not solve it... only after removing golang-src as:

```
$ rpm -e golang golang-bin gol;ang-src was necessary
$ dnf install -y golang
```

the issue was resolved

Comment 3 Jakub Čajka 2017-06-23 08:09:13 UTC
I can't reproduce it locally on my F25 (after several attempts).
Build of minishift fails for me with:

[INFO]	Replacing existing vendor dependencies
[INFO]	Removing nested vendor and Godeps/_workspace directories...
[INFO]	Removing: /home/jcajka/upstream/minishift/vendor/github.com/cpuguy83/go-md2man/vendor
[INFO]	Removing: /home/jcajka/upstream/minishift/vendor/github.com/docker/docker/vendor
[INFO]	Removing: /home/jcajka/upstream/minishift/vendor/github.com/docker/machine/vendor
go install -pkgdir=/home/jcajka/upstream/minishift/out/bindata -ldflags="-X github.com/minishift/minishift/pkg/version.minishiftVersion=1.1.0 -X github.com/minishift/minishift/pkg/version.b2dIsoVersion=v1.0.2 -X github.com/minishift/minishift/pkg/version.centOsIsoVersion=v1.0.0 -X github.com/minishift/minishift/pkg/version.openshiftVersion=v1.5.1" ./cmd/minishift
cmd/minishift/main.go:20:2: cannot find package "github.com/minishift/minishift/cmd/minishift/cmd" in any of:
	/usr/lib/golang/src/github.com/minishift/minishift/cmd/minishift/cmd (from $GOROOT)
	/home/jcajka/go/src/github.com/minishift/minishift/cmd/minishift/cmd (from $GOPATH)
cmd/minishift/main.go:21:2: cannot find package "github.com/minishift/minishift/pkg/minikube/machine" in any of:
	/usr/lib/golang/src/github.com/minishift/minishift/pkg/minikube/machine (from $GOROOT)
	/home/jcajka/go/src/github.com/minishift/minishift/pkg/minikube/machine (from $GOPATH)
Makefile:57: recipe for target '/home/jcajka/go/bin/minishift' failed

This seems to me as some kind of bug in the Makefile/buildscripts.

So closing as notabug as it seems to me as some kind of build environment pollution. Also as I haven't been able to even reproduce on my machine with "go build crypto/md5", whenever clean install or on update path from 1.7.5.

Comment 4 Jakub Čajka 2017-06-23 08:25:30 UTC
Oh... and if it still persists for you. Please provide sha256sum of /usr/lib/golang/src/crypto/crypto.go, and output of "rpm -qa "golang*"" and "rpm -Vv golang-src-1.7.6-1.fc25.noarch"


Note You need to log in before you can comment on or make changes to this bug.