@@ -117,23 +117,15 @@ var (
117117		debEthereum ,
118118	}
119119
120- 	// Distros for which packages are created. 
121- 	// Note: vivid is unsupported because there is no golang-1.6 package for it. 
122- 	// Note: the following Ubuntu releases have been officially deprecated on Launchpad: 
123- 	//   wily, yakkety, zesty, artful, cosmic, disco, eoan, groovy, hirsuite, impish, 
124- 	//   kinetic, lunar 
125- 	debDistroGoBoots  =  map [string ]string {
126- 		"trusty" : "golang-1.11" , // 14.04, EOL: 04/2024 
127- 		"xenial" : "golang-go" ,   // 16.04, EOL: 04/2026 
128- 		"bionic" : "golang-go" ,   // 18.04, EOL: 04/2028 
129- 		"focal" :  "golang-go" ,   // 20.04, EOL: 04/2030 
130- 		"jammy" :  "golang-go" ,   // 22.04, EOL: 04/2032 
131- 		"mantic" : "golang-go" ,   // 23.10, EOL: 07/2024 
132- 	}
120+ 	// Distros for which packages are created 
121+ 	debDistros  =  []string {
122+ 		"xenial" , // 16.04, EOL: 04/2026 
123+ 		"bionic" , // 18.04, EOL: 04/2028 
124+ 		"focal" ,  // 20.04, EOL: 04/2030 
125+ 		"jammy" ,  // 22.04, EOL: 04/2032 
126+ 		"noble" ,  // 24.04, EOL: 04/2034 
133127
134- 	debGoBootPaths  =  map [string ]string {
135- 		"golang-1.11" : "/usr/lib/go-1.11" ,
136- 		"golang-go" :   "/usr/lib/go" ,
128+ 		"mantic" , // 23.10, EOL: 07/2024 
137129	}
138130
139131	// This is where the tests should be unpacked. 
@@ -694,8 +686,8 @@ func doDebianSource(cmdline []string) {
694686	}
695687	// Download and verify the Go source packages. 
696688	var  (
697- 		gobootbundle  =  downloadGoBootstrapSources (* cachedir )
698- 		gobundle      =  downloadGoSources (* cachedir )
689+ 		gobootbundles  =  downloadGoBootstrapSources (* cachedir )
690+ 		gobundle        =  downloadGoSources (* cachedir )
699691	)
700692	// Download all the dependencies needed to build the sources and run the ci script 
701693	srcdepfetch  :=  tc .Go ("mod" , "download" )
@@ -708,17 +700,19 @@ func doDebianSource(cmdline []string) {
708700
709701	// Create Debian packages and upload them. 
710702	for  _ , pkg  :=  range  debPackages  {
711- 		for  distro ,  goboot  :=  range  debDistroGoBoots  {
703+ 		for  _ ,  distro  :=  range  debDistros  {
712704			// Prepare the debian package with the go-ethereum sources. 
713- 			meta  :=  newDebMetadata (distro , goboot ,  * signer , env , now , pkg .Name , pkg .Version , pkg .Executables )
705+ 			meta  :=  newDebMetadata (distro , * signer , env , now , pkg .Name , pkg .Version , pkg .Executables )
714706			pkgdir  :=  stageDebianSource (* workdir , meta )
715707
716708			// Add bootstrapper Go source code 
717- 			if  err  :=  build .ExtractArchive (gobootbundle , pkgdir ); err  !=  nil  {
718- 				log .Fatalf ("Failed to extract bootstrapper Go sources: %v" , err )
719- 			}
720- 			if  err  :=  os .Rename (filepath .Join (pkgdir , "go" ), filepath .Join (pkgdir , ".goboot" )); err  !=  nil  {
721- 				log .Fatalf ("Failed to rename bootstrapper Go source folder: %v" , err )
709+ 			for  i , gobootbundle  :=  range  gobootbundles  {
710+ 				if  err  :=  build .ExtractArchive (gobootbundle , pkgdir ); err  !=  nil  {
711+ 					log .Fatalf ("Failed to extract bootstrapper Go sources: %v" , err )
712+ 				}
713+ 				if  err  :=  os .Rename (filepath .Join (pkgdir , "go" ), filepath .Join (pkgdir , fmt .Sprintf (".goboot-%d" , i + 1 ))); err  !=  nil  {
714+ 					log .Fatalf ("Failed to rename bootstrapper Go source folder: %v" , err )
715+ 				}
722716			}
723717			// Add builder Go source code 
724718			if  err  :=  build .ExtractArchive (gobundle , pkgdir ); err  !=  nil  {
@@ -754,21 +748,26 @@ func doDebianSource(cmdline []string) {
754748	}
755749}
756750
757- // downloadGoBootstrapSources downloads the Go source tarball that will be used 
751+ // downloadGoBootstrapSources downloads the Go source tarball(s)  that will be used 
758752// to bootstrap the builder Go. 
759- func  downloadGoBootstrapSources (cachedir  string ) string  {
753+ func  downloadGoBootstrapSources (cachedir  string ) [] string  {
760754	csdb  :=  build .MustLoadChecksums ("build/checksums.txt" )
761- 	gobootVersion , err  :=  build .Version (csdb , "ppa-builder" )
762- 	if  err  !=  nil  {
763- 		log .Fatal (err )
764- 	}
765- 	file  :=  fmt .Sprintf ("go%s.src.tar.gz" , gobootVersion )
766- 	url  :=  "https://dl.google.com/go/"  +  file 
767- 	dst  :=  filepath .Join (cachedir , file )
768- 	if  err  :=  csdb .DownloadFile (url , dst ); err  !=  nil  {
769- 		log .Fatal (err )
755+ 
756+ 	var  bundles  []string 
757+ 	for  _ , booter  :=  range  []string {"ppa-builder-1" , "ppa-builder-2" } {
758+ 		gobootVersion , err  :=  build .Version (csdb , booter )
759+ 		if  err  !=  nil  {
760+ 			log .Fatal (err )
761+ 		}
762+ 		file  :=  fmt .Sprintf ("go%s.src.tar.gz" , gobootVersion )
763+ 		url  :=  "https://dl.google.com/go/"  +  file 
764+ 		dst  :=  filepath .Join (cachedir , file )
765+ 		if  err  :=  csdb .DownloadFile (url , dst ); err  !=  nil  {
766+ 			log .Fatal (err )
767+ 		}
768+ 		bundles  =  append (bundles , dst )
770769	}
771- 	return  dst 
770+ 	return  bundles 
772771}
773772
774773// downloadGoSources downloads the Go source tarball. 
@@ -846,10 +845,7 @@ type debPackage struct {
846845}
847846
848847type  debMetadata  struct  {
849- 	Env            build.Environment 
850- 	GoBootPackage  string 
851- 	GoBootPath     string 
852- 
848+ 	Env          build.Environment 
853849	PackageName  string 
854850
855851	// go-ethereum version being built. Note that this 
@@ -877,21 +873,19 @@ func (d debExecutable) Package() string {
877873	return  d .BinaryName 
878874}
879875
880- func  newDebMetadata (distro , goboot ,  author  string , env  build.Environment , t  time.Time , name  string , version  string , exes  []debExecutable ) debMetadata  {
876+ func  newDebMetadata (distro , author  string , env  build.Environment , t  time.Time , name  string , version  string , exes  []debExecutable ) debMetadata  {
881877	if  author  ==  ""  {
882878		// No signing key, use default author. 
883879		author  =  "Ethereum Builds <[email protected] >"  884880	}
885881	return  debMetadata {
886- 		GoBootPackage : goboot ,
887- 		GoBootPath :    debGoBootPaths [goboot ],
888- 		PackageName :   name ,
889- 		Env :           env ,
890- 		Author :        author ,
891- 		Distro :        distro ,
892- 		Version :       version ,
893- 		Time :          t .Format (time .RFC1123Z ),
894- 		Executables :   exes ,
882+ 		PackageName : name ,
883+ 		Env :         env ,
884+ 		Author :      author ,
885+ 		Distro :      distro ,
886+ 		Version :     version ,
887+ 		Time :        t .Format (time .RFC1123Z ),
888+ 		Executables : exes ,
895889	}
896890}
897891
0 commit comments