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

build: specify the key to use when invoking gpg:sign-and-deploy-file #16696

Merged
merged 2 commits into from May 8, 2018

Conversation

Projects
None yet
4 participants
@ligi
Member

ligi commented May 7, 2018

This way I could locally upload after the initial problem that the wrong key was used to sign.

This should fix #16433

@ligi ligi requested a review from karalabe May 7, 2018

@karalabe

This comment has been minimized.

Member

karalabe commented May 7, 2018

I don't really like hard coding credentials into build scripts. The key content is taken from an ENV var. Lets generate the key ID based on the env var, not hard code it into the script. This will just bite us later.

@ligi

This comment has been minimized.

Member

ligi commented May 7, 2018

ack & done as requested

@fjl

This comment has been minimized.

Contributor

fjl commented May 8, 2018

You can use this function to get the key ID with the Go openpgp library.

// PGPKeyID parses an armored key and returns the key ID.
func PGPKeyID(pgpkey string) (string, error) {
	keys, err := openpgp.ReadArmoredKeyRing(bytes.NewBufferString(pgpkey))
	if err != nil {
		return "", err
	}
	if len(keys) != 1 {
		return "", fmt.Errorf("key count mismatch: have %d, want %d", len(keys), 1)
	}
	return keys[0].PrimaryKey.KeyIdString(), nil
}
@ligi

This comment has been minimized.

Member

ligi commented May 8, 2018

Updated to incorporate @fjl 's idea

:shipit: ?-)

build/ci.go Outdated
log.Fatal(err)
}
// Upload the artifacts to Sonatype and/or Maven Central

This comment has been minimized.

@fjl

fjl May 8, 2018

Contributor

With this change, -signer is required for -upload. Please remove the if around the variable to make that more clear.

@fjl

fjl approved these changes May 8, 2018

Thank you.

build/ci.go Outdated
build.MustRun(gpg)
keyID, err := build.PGPKeyID(string(key))

This comment has been minimized.

@karalabe

karalabe May 8, 2018

Member

Imma be an arse and ask that you delete this empty line. There's absolutely no value it it and it makes the code fall apart. Also please delete the empty line 3 lines below after the closing brace (you already have an entire line almost empty that only contains a brace, that's visually delimited enough not to require extra empty lines).

build: Specify the key to use
This way I could locally upload to maven central
after the initial problem that the wrong key was used to sign
This should fix #16433
@ligi

This comment has been minimized.

Member

ligi commented May 8, 2018

@karalabe done - I usually like to insert some blanks so things don't feel cramped - but obey your will here ;-)

@karalabe

SGTM

@fjl fjl changed the title from build: Specify the key to use when invoking gpg:sign-and-deploy-file to build: specify the key to use when invoking gpg:sign-and-deploy-file May 8, 2018

@fjl fjl merged commit eab6e5a into ethereum:master May 8, 2018

2 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
commit-message-check/gitcop All commit messages are valid
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Amorn-Kingthong

This comment has been minimized.

Amorn-Kingthong commented May 10, 2018

I WILL JOIN

@ligi

This comment has been minimized.

Member

ligi commented May 10, 2018

@Amorn-Kingthong join what?

Amorn-Kingthong added a commit to Amorn-Kingthong/go-ethereum that referenced this pull request May 10, 2018

gbalint added a commit to ethersphere/go-ethereum that referenced this pull request May 23, 2018

gbalint added a commit to ethersphere/go-ethereum that referenced this pull request May 24, 2018

swarm-network-rewrite conflicts with master (#589)
* core/types: avoid duplicating transactions on changing signer (ethereum#16435)

* core/state: cache missing storage entries (ethereum#16584)

* cmd/utils: point users to --syncmode under DEPRECATED (ethereum#16572)

Indicate that --light and --fast options are replaced by --syncmode

* trie: remove unused `buf` parameter (ethereum#16583)

* core, eth: fix tracer dirty finalization

* travis.yml: remove obsolete brew-cask install

* whisper: Golint fixes in whisper packages (ethereum#16637)

* vendor: fix leveldb crash when bigger than 1 TiB

* core: ensure local transactions aren't discarded as underpriced

This fixes an issue where local transactions are discarded as
underpriced when the pool and queue are full.

* evm/main: use blocknumber from genesis

* accounts: golint updates for this or self warning (ethereum#16627)

* tests: golint fixes for tests directory (ethereum#16640)

* trie: golint iterator fixes (ethereum#16639)

* internal: golint updates for this or self warning (ethereum#16634)

* core: golint updates for this or self warning (ethereum#16633)

* build: Add ldflags -s -w when building aar

Smaller size on mobile is always good.
Might also solve our maven central upload problem

* cmd/clef: documentation about setup (ethereum#16568)

clef: documentation about setup

* params: release geth 1.8.7

* VERSION, params: begin v1.8.8 release cycle

* log: changed if-else blocks to conform with golint (ethereum#16661)

* p2p: changed if-else blocks to conform with golint (ethereum#16660)

* les: changed if-else blocks to conform with golint (ethereum#16658)

* accounts: changed if-else blocks to conform with golint (ethereum#16654)

* rpc: golint error with context as last parameter (ethereum#16657)

* rpc/*: golint error with context as last parameter

* Update json.go

* metrics: golint updates for this or self warning (ethereum#16635)

* metrics/*: golint updates for this or self warning

* metrics/*: golint updates for this or self warning, updated pr from feedback

* consensus/ethash: fixed typo (ethereum#16665)

* event: golint updates for this or self warning (ethereum#16631)

* event/*: golint updates for this or self warning

* event/*: golint updates for this or self warning, pr updated per feedback

* eth: golint updates for this or self warning (ethereum#16632)

* eth/*:golint updates for this or self warning

* eth/*: golint updates for this or self warning, pr updated per feedback

* signer: fix golint errors (ethereum#16653)

* signer/*: golint fixes

Specifically naming and comment formatting for documentation

* signer/*: fixed naming error crashing build

* signer/*: corrected error

* signer/core: fix tiny error whitespace

* signer/rules: fix test refactor

* whisper/mailserver: pass init error to the caller (ethereum#16671)

* whisper/mailserver: pass init error to the caller

* whisper/mailserver: add returns to fmt.Errorf

* whisper/mailserver: check err in mailserver init test

* common: changed if-else blocks to conform with golint (ethereum#16656)

* mobile: add GetStatus Method for Receipt (ethereum#16598)

* core/rawdb: separate raw database access to own package (ethereum#16666)

* rlp: fix some golint warnings (ethereum#16659)

* p2p: fix some golint warnings (ethereum#16577)

* eth/filters: derive FilterCriteria from ethereum.FilterQuery (ethereum#16629)

* p2p/simulations/adapters: fix websocket log line parsing in exec adapter (ethereum#16667)

* build: specify the key to use when invoking gpg:sign-and-deploy-file (ethereum#16696)

* crypto: fix golint warnings (ethereum#16710)

* p2p: don't discard reason set by Disconnect (ethereum#16559)

Peer.run was discarding the reason for disconnection sent to the disc
channel by Disconnect.

* cmd: various golint fixes (ethereum#16700)

* cmd: various golint fixes

* cmd: update to pr change request

* cmd: update to pr change request

* eth: golint fixes to variable names (ethereum#16711)

* eth/filter: check nil pointer when unsubscribe (ethereum#16682)

* eth/filter: check nil pointer when unsubscribe

* eth/filters, accounts, rpc: abort system if subscribe failed

* eth/filter: add crit log before exit

* eth/filter, event: minor fixes

* whisper/shhclient: update call to shh_generateSymKeyFromPassword to pass a string (ethereum#16668)

* all: get rid of error when creating memory database (ethereum#16716)

* all: get rid of error when create mdb

* core: clean up variables definition

* all: inline mdb definition

* event: document select case slice use and add edge case test (ethereum#16680)

Feed keeps active subscription channels in a slice called 'f.sendCases'.
The Send method tracks the active cases in a local variable 'cases'
whose value is f.sendCases initially. 'cases' shrinks to a shorter
prefix of f.sendCases every time a send succeeds, moving the successful
case out of range of the active case list.

This can be confusing because the two slices share a backing array. Add
more comments to document what is going on. Also add a test for removing
a case that is in 'f.sentCases' but not 'cases'.

* travis: use Android NDK 16b (ethereum#16562)

* bmt: golint updates for this or self warning (ethereum#16628)

* bmt/*: golint updates for this or self warning

* Update bmt.go

* light: new CHT for mainnet and ropsten (ethereum#16736)

* params: release go-ethereum v1.8.8

* VERSION, params: start 1.8.9 release cycle

* accounts/abi: allow abi: tags when unpacking structs

Go code users can now tag event struct members with `abi:` to specify in what fields the event will be de-serialized.

See PR ethereum#16648 for details.

* travis: try to upgrade android builder to trusty

* p2p/enr: updates for discovery v4 compatibility (ethereum#16679)

This applies spec changes from ethereum/EIPs#1049 and adds support for
pluggable identity schemes.

Some care has been taken to make the "v4" scheme standalone. It uses
public APIs only and could be moved out of package enr at any time.

A couple of minor changes were needed to make identity schemes work:

- The sequence number is now updated in Set instead of when signing.
- Record is now copy-safe, i.e. calling Set on a shallow copy doesn't
  modify the record it was copied from.

* all: collate new transaction events together

* core, eth: minor txpool event cleanups

* travis, appveyor: bump Go release to 1.10.2

* core, consensus: fix some typos in comment code and output log

* eth: propagate blocks and transactions async

* trie: fixes to comply with golint (ethereum#16771)

* log: fixes for golint warnings (ethereum#16775)

* node: all golint warnings fixed (ethereum#16773)

* node: all golint warnings fixed

* node: rm per peter

* node: rm per peter

* vendor, ethdb: print warning log if leveldb is performing compaction (ethereum#16766)

* vendor: update leveldb package

* ethdb: print warning log if db is performing compaction

* ethdb: update annotation and log

* core/types: convert status type from uint to uint64 (ethereum#16784)

* trie: support proof generation from the iterator

* core/vm: fix typo in instructions.go (ethereum#16788)

* core: use a wrapped map to remove contention in `TxPool.Get`. (ethereum#16670)

* core: use a wrapped `map` and `sync.RWMutex` for `TxPool.all` to remove contention in `TxPool.Get`.

* core: Remove redundant `txLookup.Find` and improve comments on txLookup methods.

b00ris added a commit to status-im/go-ethereum that referenced this pull request Jun 7, 2018

hackmod pushed a commit to OpenCommunityCoin/go-esn that referenced this pull request Jul 9, 2018

firmianavan added a commit to firmianavan/go-ethereum that referenced this pull request Aug 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment