build: disable swarm packages (#19585)

* build: disable swarm packages

* build: remove allCrossCompiledArchiveFiles; inline allToolsArchiveFiles

* build: get rid of some superfluous comments
This commit is contained in:
Anton Evangelatov 2019-05-17 01:06:20 +02:00 committed by Péter Szilágyi
parent f5d89cdb72
commit 8cce620311

View File

@ -60,7 +60,6 @@ import (
"github.com/ethereum/go-ethereum/internal/build" "github.com/ethereum/go-ethereum/internal/build"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
sv "github.com/ethereum/go-ethereum/swarm/version"
) )
var ( var (
@ -83,12 +82,6 @@ var (
executablePath("clef"), executablePath("clef"),
} }
// Files that end up in the swarm*.zip archive.
swarmArchiveFiles = []string{
"COPYING",
executablePath("swarm"),
}
// A debian package is created for all executables listed here. // A debian package is created for all executables listed here.
debExecutables = []debExecutable{ debExecutables = []debExecutable{
{ {
@ -126,13 +119,6 @@ var (
} }
// A debian package is created for all executables listed here. // A debian package is created for all executables listed here.
debSwarmExecutables = []debExecutable{
{
BinaryName: "swarm",
PackageName: "ethereum-swarm",
Description: "Ethereum Swarm daemon and tools",
},
}
debEthereum = debPackage{ debEthereum = debPackage{
Name: "ethereum", Name: "ethereum",
@ -140,21 +126,11 @@ var (
Executables: debExecutables, Executables: debExecutables,
} }
debSwarm = debPackage{
Name: "ethereum-swarm",
Version: sv.Version,
Executables: debSwarmExecutables,
}
// Debian meta packages to build and push to Ubuntu PPA // Debian meta packages to build and push to Ubuntu PPA
debPackages = []debPackage{ debPackages = []debPackage{
debSwarm,
debEthereum, debEthereum,
} }
// Packages to be cross-compiled by the xgo command
allCrossCompiledArchiveFiles = append(allToolsArchiveFiles, swarmArchiveFiles...)
// Distros for which packages are created. // Distros for which packages are created.
// Note: vivid is unsupported because there is no golang-1.6 package for it. // Note: vivid is unsupported because there is no golang-1.6 package for it.
// Note: wily is unsupported because it was officially deprecated on lanchpad. // Note: wily is unsupported because it was officially deprecated on lanchpad.
@ -409,9 +385,6 @@ func doArchive(cmdline []string) {
basegeth = archiveBasename(*arch, params.ArchiveVersion(env.Commit)) basegeth = archiveBasename(*arch, params.ArchiveVersion(env.Commit))
geth = "geth-" + basegeth + ext geth = "geth-" + basegeth + ext
alltools = "geth-alltools-" + basegeth + ext alltools = "geth-alltools-" + basegeth + ext
baseswarm = archiveBasename(*arch, sv.ArchiveVersion(env.Commit))
swarm = "swarm-" + baseswarm + ext
) )
maybeSkipArchive(env) maybeSkipArchive(env)
if err := build.WriteArchive(geth, gethArchiveFiles); err != nil { if err := build.WriteArchive(geth, gethArchiveFiles); err != nil {
@ -420,10 +393,7 @@ func doArchive(cmdline []string) {
if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil { if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil {
log.Fatal(err) log.Fatal(err)
} }
if err := build.WriteArchive(swarm, swarmArchiveFiles); err != nil { for _, archive := range []string{geth, alltools} {
log.Fatal(err)
}
for _, archive := range []string{geth, alltools, swarm} {
if err := archiveUpload(archive, *upload, *signer); err != nil { if err := archiveUpload(archive, *upload, *signer); err != nil {
log.Fatal(err) log.Fatal(err)
} }
@ -586,8 +556,8 @@ func isUnstableBuild(env build.Environment) bool {
} }
type debPackage struct { type debPackage struct {
Name string // the name of the Debian package to produce, e.g. "ethereum", or "ethereum-swarm" Name string // the name of the Debian package to produce, e.g. "ethereum"
Version string // the clean version of the debPackage, e.g. 1.8.12 or 0.3.0, without any metadata Version string // the clean version of the debPackage, e.g. 1.8.12, without any metadata
Executables []debExecutable // executables to be included in the package Executables []debExecutable // executables to be included in the package
} }
@ -1023,7 +993,7 @@ func doXgo(cmdline []string) {
if *alltools { if *alltools {
args = append(args, []string{"--dest", GOBIN}...) args = append(args, []string{"--dest", GOBIN}...)
for _, res := range allCrossCompiledArchiveFiles { for _, res := range allToolsArchiveFiles {
if strings.HasPrefix(res, GOBIN) { if strings.HasPrefix(res, GOBIN) {
// Binary tool found, cross build it explicitly // Binary tool found, cross build it explicitly
args = append(args, "./"+filepath.Join("cmd", filepath.Base(res))) args = append(args, "./"+filepath.Join("cmd", filepath.Base(res)))