@@ -59,6 +59,7 @@ import (
5959 "strings"
6060 "time"
6161
62+ "github.com/cespare/cp"
6263 "github.com/ethereum/go-ethereum/internal/build"
6364 "github.com/ethereum/go-ethereum/params"
6465)
@@ -516,8 +517,9 @@ func doDebianSource(cmdline []string) {
516517 log .Fatalf ("Failed to rename Go source folder: %v" , err )
517518 }
518519 // Add all dependency modules in compressed form
519- build .CopyFolder (filepath .Join (pkgdir , ".mod" , "cache" , "download" ), filepath .Join (gobuild .Default .GOPATH , "pkg" , "mod" , "cache" , "download" ), 0755 )
520-
520+ if err := cp .CopyAll (filepath .Join (pkgdir , ".mod" , "cache" , "download" ), filepath .Join (gobuild .Default .GOPATH , "pkg" , "mod" , "cache" , "download" )); err != nil {
521+ log .Fatalf ("Failed to copy Go module dependencies: %v" , err )
522+ }
521523 // Run the packaging and upload to the PPA
522524 debuild := exec .Command ("debuild" , "-S" , "-sa" , "-us" , "-uc" , "-d" , "-Zxz" )
523525 debuild .Dir = pkgdir
@@ -783,9 +785,12 @@ func doWindowsInstaller(cmdline []string) {
783785 build .Render ("build/nsis.uninstall.nsh" , filepath .Join (* workdir , "uninstall.nsh" ), 0644 , allTools )
784786 build .Render ("build/nsis.pathupdate.nsh" , filepath .Join (* workdir , "PathUpdate.nsh" ), 0644 , nil )
785787 build .Render ("build/nsis.envvarupdate.nsh" , filepath .Join (* workdir , "EnvVarUpdate.nsh" ), 0644 , nil )
786- build .CopyFile (filepath .Join (* workdir , "SimpleFC.dll" ), "build/nsis.simplefc.dll" , 0755 )
787- build .CopyFile (filepath .Join (* workdir , "COPYING" ), "COPYING" , 0755 )
788-
788+ if err := cp .CopyFile (filepath .Join (* workdir , "SimpleFC.dll" ), "build/nsis.simplefc.dll" ); err != nil {
789+ log .Fatal ("Failed to copy SimpleFC.dll: %v" , err )
790+ }
791+ if err := cp .CopyFile (filepath .Join (* workdir , "COPYING" ), "COPYING" ); err != nil {
792+ log .Fatal ("Failed to copy copyright note: %v" , err )
793+ }
789794 // Build the installer. This assumes that all the needed files have been previously
790795 // built (don't mix building and packaging to keep cross compilation complexity to a
791796 // minimum).
@@ -802,7 +807,6 @@ func doWindowsInstaller(cmdline []string) {
802807 "/DARCH=" + * arch ,
803808 filepath .Join (* workdir , "geth.nsi" ),
804809 )
805-
806810 // Sign and publish installer.
807811 if err := archiveUpload (installer , * upload , * signer ); err != nil {
808812 log .Fatal (err )
0 commit comments