Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x509: update go-generator #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

x509: update go-generator #87

wants to merge 1 commit into from

Conversation

aerth
Copy link

@aerth aerth commented Oct 8, 2018

  • Fixes build on FreeBSD
  • simplifies install.sh
  • removes bash dependency (from this package at least)

@aerth aerth force-pushed the imports branch 4 times, most recently from da3b8e5 to 5050845 Compare October 8, 2018 21:40
@JeremyRand
Copy link
Member

Thanks for the PR. I think the Travis failure is safe to ignore; it's due to upstream gometalinter recently adding a new linter that we haven't yet dealt with. Just to be safe, I'll hold off on merging this until a fix for the Travis fix is merged in case there's another issue Travis found that I missed while skimming the output.

NEW_PACKAGE="${NEW_PACKAGE//\//\\/}"
sed -i "s/${OLD_PACKAGE}/${NEW_PACKAGE}/g" ./*.go ${GOPATH}/src/vendor/golang.org/x/crypto/cryptobyte/*.go
#!/bin/sh
set -e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I correct in inferring that the set -u, set -o pipefail, and shopt -s failglob were removed for compatibility with sh? I'm honestly not sure how I feel about this change; those options are useful from a safety perspective. @hlandau what do you think about this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and, well, theres no piping going on so theres no need for pipefail

x509/install.sh Outdated
sed -i "s/${OLD_PACKAGE}/${NEW_PACKAGE}/g" ./*.go ${GOPATH}/src/vendor/golang.org/x/crypto/cryptobyte/*.go
#!/bin/sh
set -e
gopath="$(go env GOROOT)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer that this variable be called goroot rather than gopath, since gopath means something else in Go.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was leftover from testing, thanks for pointing that out!

x509/install.sh Outdated
test -d $gopath
test -d $x509path
cp -av $x509path/testdata .
cp -v $x509path/*.* .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why leave out the -a here? And why two cp commands here? Is the single cp in the original broken in some way?

cp -av $x509path/testdata .
cp -v $x509path/*.* .
rm x509_test.go
sed -i.bak 's/golang_org/golang.org/g' x509.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you've removed the copying of the cryptobyte package... is that copy actually unnecessary now? I seem to remember it being required when I was porting to Go 1.10.x, is that no longer the case?

Copy link
Author

@aerth aerth Oct 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer necessary it seems (go 1.11.1 here)

@JeremyRand
Copy link
Member

The x509 package was moved to https://github.com/namecoin/x509-signature-splice , can you resubmit this PR over there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants