microsoft / go

The Microsoft build of the Go toolset
BSD 3-Clause "New" or "Revised" License
287 stars 28 forks source link

release patched tarball has differences with git submodule go checkout, git am patches #1303

Closed xnox closed 2 months ago

xnox commented 2 months ago

There are two differences between the git submodule checkout of go; git am apply all patches, versus the released patched tarball.

chmod +x appears to be lost on many files (bash and shell scripts, testdata files), and .github, .gitignore, .gitattributes are missing.

$ git diff --no-index --stat go/ tarball/go/
 go/.git => /dev/null                                                             |   1 -
 go/.gitattributes => /dev/null                                                   |  16 -------
 go/.github/CODE_OF_CONDUCT.md => /dev/null                                       |   3 --
 go/.github/ISSUE_TEMPLATE/00-bug.yml => /dev/null                                |  94 --------------------------------------
 go/.github/ISSUE_TEMPLATE/01-pkgsite.yml => /dev/null                            |  47 -------------------
 go/.github/ISSUE_TEMPLATE/02-pkgsite-removal.yml => /dev/null                    |  42 -----------------
 go/.github/ISSUE_TEMPLATE/03-gopls.yml => /dev/null                              |  56 -----------------------
 go/.github/ISSUE_TEMPLATE/04-vuln.yml => /dev/null                               |  52 ---------------------
 go/.github/ISSUE_TEMPLATE/10-proposal.yml => /dev/null                           |  15 -------
 go/.github/ISSUE_TEMPLATE/11-language-change.yml => /dev/null                    | 165 -------------------------------------------------------------------
 go/.github/ISSUE_TEMPLATE/12-telemetry.yml => /dev/null                          |  30 -------------
 go/.github/ISSUE_TEMPLATE/config.yml => /dev/null                                |   5 ---
 go/.github/PULL_REQUEST_TEMPLATE => /dev/null                                    |  25 -----------
 go/.github/SUPPORT.md => /dev/null                                               |  14 ------
 go/.gitignore => /dev/null                                                       |  52 ---------------------
 {go => tarball/go}/src/cmd/compile/profile.sh                                    |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/plan9/mkall.sh                |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/plan9/mkerrors.sh             |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh       |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/unix/mkall.sh                 |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh              |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/windows/mkerrors.bash         |   0
 {go => tarball/go}/src/cmd/vendor/golang.org/x/sys/windows/mkknownfolderids.bash |   0
 {go => tarball/go}/src/cmp.bash                                                  |   0
 {go => tarball/go}/src/debug/dwarf/testdata/ranges.elf                           | Bin 10348 -> 10348 bytes
 {go => tarball/go}/src/debug/dwarf/testdata/rnglistx.elf                         | Bin 11024 -> 11024 bytes
 {go => tarball/go}/src/debug/dwarf/testdata/typedef.elf                          | Bin 12448 -> 12448 bytes
 {go => tarball/go}/src/runtime/pprof/testdata/test32                             | Bin 528 -> 528 bytes
 {go => tarball/go}/src/runtime/pprof/testdata/test32be                           | Bin 520 -> 520 bytes
 {go => tarball/go}/src/runtime/pprof/testdata/test64                             | Bin 760 -> 760 bytes
 {go => tarball/go}/src/runtime/pprof/testdata/test64be                           | Bin 856 -> 856 bytes

It would be ideal if released patched tarballs match git submodule checkout / git am / git export.

karianna commented 2 months ago

@dagood for triage.

dagood commented 2 months ago

It would be ideal if released patched tarballs match git submodule checkout / git am / git export.

Why is that? IMO it is better if they match what you would find on https://go.dev/dl/. We use upstream tooling to create the source tarball--not just for convenience, but in order to make sure it matches upstream.

(And the reason matching upstream is useful is that someone who already has a build system for upstream source tarballs can (usually) swap in our tarball without changing the build process or dealing with side effects from discrepancies.)

xnox commented 2 months ago

It would be ideal if released patched tarballs match git submodule checkout / git am / git export.

Why is that? IMO it is better if they match what you would find on https://go.dev/dl/. We use upstream tooling to create the source tarball--not just for convenience, but in order to make sure it matches upstream.

(And the reason matching upstream is useful is that someone who already has a build system for upstream source tarballs can (usually) swap in our tarball without changing the build process or dealing with side effects from discrepancies.)

Ack.

I'll redirect my request there then!