Commit Graph

23 Commits

Author SHA1 Message Date
brian m. carlson
20b25b975f
debian/rules: update for Go 1.12
dh_golang wants to turn off the module cache because attempting to use
it breaks sbuild, a component of Debian's package build system. However,
as of Go 1.12, the package build cache is required. Create a temporary
directory for the cache and override the environment variable so that we
can build with Go 1.12. Pass the environment variables to the dh command
directly, since export only affects submakes, not individual commands.

In addition, stop copying the pkg directory into the archive, because it
is no longer produced and attempting to copy nonexisting files causes
the build to fail.
2019-07-15 16:40:31 +00:00
Stephen Gelman
8b90eff16e Switch from manually running go generate to using dh-golang to run it
This fixes #2013.  For some reason I could only reproduce the issue from
within the docker builder, not when running outside of docker.
Regardless, this appears to fix the problem and is a generally cleaner
solution anyway that will continue to work if any other generate
commands are added to git-lfs.
2019-03-04 00:41:04 -06:00
Taylor Blau
114e85c200 all: use Go Modules instead of Glide
Since we are now building on Go 1.11 (as of 074a2d4f (all: use Go 1.11
in CI, 2018-08-28)) and Go 1.11 supports Go Modules [1], let's stop
using Glide, and begin using Go Modules.

This involves a few things:

  * Teach the Makefile how to build go.sum files instead of glide.lock
    files.

  * Teach continuous integration services to build Git LFS in a
    non-$GOPATH environment, since (without setting GO111MODULE=on
    explicitly, which we choose not to do), this will break compiling
    Git LFS, because Go 1.11 will ignore modules present in a Go
    checkout beneath $GOPATH.

  * In order to do the above, let's also make sure that we are
    un-setting $GOCACHE in the environment, as this causes Go to work
    without modules support [2].

  * Because we're no longer building in a `$GOPATH`-based location,
    let's instruct the CircleCI base image to archive the new location,
    too.

  * Similarly, teach the RPM spec to build in a non-$GOPATH location.

  * By contrast, since we use dh_golang to build git-lfs binaries on
    Debian, let's wait until the upstream dh_golang package is released
    with support for Go 1.11 module support explicitly. Therefore, force
    GO111MODULE to be on so that we can build a copy of Git LFS whose
    checkout is within a $GOPATH.

Although the go.mod versions match the glide.yaml ones, the diff
attached is large because Go Modules do not vendor `_test.go` files,
whereas Glide does.

[1]: https://golang.org/doc/go1.11#modules
[2]: `GOCACHE=on` will be deprecated in Go 1.12, so this change makes
     sense for that reason, too.

Co-authored-by: brian m. carlson <bk2204@github.com>
2018-08-29 13:25:47 -04:00
Taylor Blau
f8ffbb58b9 debian/rules: unset GO15VENDOREXPERIMENT
This option was introduced historically in order to build Go packages in
Go 1.5 with vendored dependencies in the vendor tree.

GO15VENDOREXPERIMENT has long since been deprecated, and is no longer
required in modern versions of Go in order to instruct to the 'go' tool
to look in this directory.

Co-authored-by: brian m. carlson <bk2204@github.com>
2018-08-28 17:12:08 -04:00
Taylor Blau
74b0e5920d Makefile: replace script/man with 'make man' target 2018-07-19 14:03:54 -05:00
Taylor Blau
b78688a18d Makefile: replace script/test with phony 'test' target 2018-07-16 16:25:54 -05:00
Stephen Gelman
9236a1a32d Run go generate on commands in deb build
The deb packages don't currently run `go generate` when building which
means commands like `git-lfs help` don't work properly.  This changes
the packaging script to run it.

Fixes #3043
2018-06-22 17:49:52 -05:00
Fabrizio Steiner
00d40f0bab Vendor SSPI dependencies. 2018-02-27 17:02:57 +01:00
Stephen Gelman
47f305fefa Fix debian 9 (stretch) builds
This commit skips the `dh_golang` step which is used to add the
Built-using field to the resulting deb.  The field is only used to track
the version of go used to build a package so omitting it shouldn't be a
problem.  In the commit at https://anonscm.debian.org/cgit/collab-maint/dh-golang.git/commit/script/dh_golang?id=7c3fbec6ea92294477fa8910264fe9bd823f21c3
the dh-golang maintainers changed the logic used to determine the
version of go used to check the installed package.  This fails because
git-lfs gets built using a manually installed version of go.
2017-05-07 18:42:52 -05:00
Povilas Kanapickas
3de912f8df debian: Support building on armhf and arm64 2017-03-26 00:11:06 +02:00
risk danger olson
7c596b970c unused. 2016-11-22 09:42:22 -07:00
risk danger olson
8773193ca0 update other github/git-lfs references 2016-11-15 10:07:11 -07:00
risk danger olson
9f1f93f2d0 look at me fixing debian errors all by myself 2016-08-19 15:09:35 -06:00
risk danger olson
e82ec57240 fix golang test excludes for dh_golang 2016-07-27 08:10:37 -06:00
Brett Randall
af10cca676 Excluded problematic vendor tests from Debian build. #1290.
Excluded those in the CI build plus github.com/spf13/cobra which also seems to fail in dpkg build.
2016-06-06 14:09:21 +10:00
Brett Randall
539b1ddeb0 Set DH_GOLANG_INSTALL_ALL=1 to test workaround for missing vendor file in tests, vendor/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_0.json . #1290. 2016-06-06 14:09:20 +10:00
Taylor Blau
e1927bd0e3 script,test,debian: GO15VENDOREXPERIMENT=1 2016-05-23 15:03:25 -06:00
Brett Randall
0b9609e326 Added GO15VENDOREXPERIMENT=0 to dpkg dh build, follow-on from #1025.
Signed-off-by: Brett Randall <javabrett@gmail.com>
2016-03-30 09:52:59 +11:00
Andy Neff
c860854bcc Fix for #719 and #995 2016-02-25 00:04:55 -05:00
Andy Neff
432e1fb876 32 bit deb's cross compiling correctly 2015-07-26 14:50:07 -04:00
Andy Neff
9248d6a6c0 32 bit debian build WORKING, but a little complicated 2015-07-26 13:43:45 -04:00
Stephen Gelman
5c3de3ea41 Fix the deb package build and bump the version to 0.5.2 2015-06-12 02:55:30 +00:00
Stephen Gelman
a5acd518f0 Add debian directory and gitignore temporary build files 2015-05-15 15:27:21 +00:00