mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
build: bump PPAs to Go 1.13 (via longsleep), keep Trusty on 1.11
This commit is contained in:
parent
9278951a62
commit
ec275fe794
4 changed files with 24 additions and 15 deletions
|
|
@ -22,19 +22,20 @@ variables `PPA_SIGNING_KEY` and `PPA_SSH_KEY` on Travis.
|
||||||
|
|
||||||
We want to build go-ethereum with the most recent version of Go, irrespective of the Go
|
We want to build go-ethereum with the most recent version of Go, irrespective of the Go
|
||||||
version that is available in the main Ubuntu repository. In order to make this possible,
|
version that is available in the main Ubuntu repository. In order to make this possible,
|
||||||
our PPA depends on the ~gophers/ubuntu/archive PPA. Our source package build-depends on
|
our we depend on ~gophers/ubuntu/archive and ~longsleep/ubuntu/golang-backports PPAs. Our
|
||||||
golang-1.11, which is co-installable alongside the regular golang package. PPA dependencies
|
source package build-depends on golang-1.11 on Tusty and golang-1.13 on others, which is
|
||||||
can be edited at https://launchpad.net/%7Eethereum/+archive/ubuntu/ethereum/+edit-dependencies
|
co-installable alongside the regular golang package. PPA dependencies can be edited at
|
||||||
|
https://launchpad.net/%7Eethereum/+archive/ubuntu/ethereum/+edit-dependencies
|
||||||
|
|
||||||
## Building Packages Locally (for testing)
|
## Building Packages Locally (for testing)
|
||||||
|
|
||||||
You need to run Ubuntu to do test packaging.
|
You need to run Ubuntu to do test packaging.
|
||||||
|
|
||||||
Add the gophers PPA and install Go 1.11 and Debian packaging tools:
|
Add the longsleep PPA and install Go 1.13 and Debian packaging tools:
|
||||||
|
|
||||||
$ sudo apt-add-repository ppa:gophers/ubuntu/archive
|
$ sudo apt-add-repository ppa:longsleep/ubuntu/golang-backports
|
||||||
$ sudo apt-get update
|
$ sudo apt-get update
|
||||||
$ sudo apt-get install build-essential golang-1.11 devscripts debhelper python-bzrlib python-paramiko
|
$ sudo apt-get install build-essential golang-1.13 devscripts debhelper python-bzrlib python-paramiko
|
||||||
|
|
||||||
Create the source packages:
|
Create the source packages:
|
||||||
|
|
||||||
|
|
@ -42,10 +43,10 @@ Create the source packages:
|
||||||
|
|
||||||
Then go into the source package directory for your running distribution and build the package:
|
Then go into the source package directory for your running distribution and build the package:
|
||||||
|
|
||||||
$ cd dist/ethereum-unstable-1.6.0+xenial
|
$ cd dist/ethereum-unstable-1.9.6+bionic
|
||||||
$ dpkg-buildpackage
|
$ dpkg-buildpackage
|
||||||
|
|
||||||
Built packages are placed in the dist/ directory.
|
Built packages are placed in the dist/ directory.
|
||||||
|
|
||||||
$ cd ..
|
$ cd ..
|
||||||
$ dpkg-deb -c geth-unstable_1.6.0+xenial_amd64.deb
|
$ dpkg-deb -c geth-unstable_1.9.6+bionic_amd64.deb
|
||||||
|
|
|
||||||
16
build/ci.go
16
build/ci.go
|
|
@ -138,7 +138,13 @@ var (
|
||||||
// Note: zesty is unsupported because it was officially deprecated on Launchpad.
|
// Note: zesty is unsupported because it was officially deprecated on Launchpad.
|
||||||
// Note: artful is unsupported because it was officially deprecated on Launchpad.
|
// Note: artful is unsupported because it was officially deprecated on Launchpad.
|
||||||
// Note: cosmic is unsupported because it was officially deprecated on Launchpad.
|
// Note: cosmic is unsupported because it was officially deprecated on Launchpad.
|
||||||
debDistros = []string{"trusty", "xenial", "bionic", "disco", "eoan"}
|
debDistros = map[string]string{
|
||||||
|
"trusty": "1.11", // Trusty is only supported in ppa:gophers/archive, which is abandoned, so we're stuck at Go 1.11
|
||||||
|
"xenial": "1.13", // Xenial and upward are supported in ppa:longsleep/golang-backports, so we can get Go 1.13
|
||||||
|
"bionic": "1.13",
|
||||||
|
"disco": "1.13",
|
||||||
|
"eoan": "1.13",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
var GOBIN, _ = filepath.Abs(filepath.Join("build", "bin"))
|
var GOBIN, _ = filepath.Abs(filepath.Join("build", "bin"))
|
||||||
|
|
@ -479,8 +485,8 @@ func doDebianSource(cmdline []string) {
|
||||||
|
|
||||||
// Create Debian packages and upload them
|
// Create Debian packages and upload them
|
||||||
for _, pkg := range debPackages {
|
for _, pkg := range debPackages {
|
||||||
for _, distro := range debDistros {
|
for distro, gover := range debDistros {
|
||||||
meta := newDebMetadata(distro, *signer, env, now, pkg.Name, pkg.Version, pkg.Executables)
|
meta := newDebMetadata(distro, gover, *signer, env, now, pkg.Name, pkg.Version, pkg.Executables)
|
||||||
pkgdir := stageDebianSource(*workdir, meta)
|
pkgdir := stageDebianSource(*workdir, meta)
|
||||||
debuild := exec.Command("debuild", "-S", "-sa", "-us", "-uc", "-d", "-Zxz")
|
debuild := exec.Command("debuild", "-S", "-sa", "-us", "-uc", "-d", "-Zxz")
|
||||||
debuild.Dir = pkgdir
|
debuild.Dir = pkgdir
|
||||||
|
|
@ -562,6 +568,7 @@ type debPackage struct {
|
||||||
|
|
||||||
type debMetadata struct {
|
type debMetadata struct {
|
||||||
Env build.Environment
|
Env build.Environment
|
||||||
|
GoVersion string
|
||||||
|
|
||||||
PackageName string
|
PackageName string
|
||||||
|
|
||||||
|
|
@ -590,12 +597,13 @@ func (d debExecutable) Package() string {
|
||||||
return d.BinaryName
|
return d.BinaryName
|
||||||
}
|
}
|
||||||
|
|
||||||
func newDebMetadata(distro, author string, env build.Environment, t time.Time, name string, version string, exes []debExecutable) debMetadata {
|
func newDebMetadata(distro, gover, author string, env build.Environment, t time.Time, name string, version string, exes []debExecutable) debMetadata {
|
||||||
if author == "" {
|
if author == "" {
|
||||||
// No signing key, use default author.
|
// No signing key, use default author.
|
||||||
author = "Ethereum Builds <fjl@ethereum.org>"
|
author = "Ethereum Builds <fjl@ethereum.org>"
|
||||||
}
|
}
|
||||||
return debMetadata{
|
return debMetadata{
|
||||||
|
GoVersion: gover,
|
||||||
PackageName: name,
|
PackageName: name,
|
||||||
Env: env,
|
Env: env,
|
||||||
Author: author,
|
Author: author,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ Source: {{.Name}}
|
||||||
Section: science
|
Section: science
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: {{.Author}}
|
Maintainer: {{.Author}}
|
||||||
Build-Depends: debhelper (>= 8.0.0), golang-1.11
|
Build-Depends: debhelper (>= 8.0.0), golang-{{.GoVersion}}
|
||||||
Standards-Version: 3.9.5
|
Standards-Version: 3.9.5
|
||||||
Homepage: https://ethereum.org
|
Homepage: https://ethereum.org
|
||||||
Vcs-Git: git://github.com/ethereum/go-ethereum.git
|
Vcs-Git: git://github.com/ethereum/go-ethereum.git
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
export GOCACHE=/tmp/go-build
|
export GOCACHE=/tmp/go-build
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
build/env.sh /usr/lib/go-1.11/bin/go run build/ci.go install -git-commit={{.Env.Commit}} -git-branch={{.Env.Branch}} -git-tag={{.Env.Tag}} -buildnum={{.Env.Buildnum}} -pull-request={{.Env.IsPullRequest}}
|
build/env.sh /usr/lib/go-{{.GoVersion}}/bin/go run build/ci.go install -git-commit={{.Env.Commit}} -git-branch={{.Env.Branch}} -git-tag={{.Env.Tag}} -buildnum={{.Env.Buildnum}} -pull-request={{.Env.IsPullRequest}}
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue