Skip to content

Lfs 1.3 fixes#3

Merged
technoweenie merged 6 commits intogit-lfs:masterfrom
technoweenie:lfs-1.3-fixes
Jul 27, 2016
Merged

Lfs 1.3 fixes#3
technoweenie merged 6 commits intogit-lfs:masterfrom
technoweenie:lfs-1.3-fixes

Conversation

@technoweenie
Copy link
Contributor

@technoweenie technoweenie commented Jul 27, 2016

In Git LFS v1.3, we made the big change to support Go vendor imports. This is a feature that was off by default in Go 1.5, on by default in Go 1.6, and always on in the upcoming Go 1.7.

When trying to build Git LFS v1.3, I got both RPM build errors and Debian build errors that indicated GOPATH is not being set properly.

This PR does the following to get packages building on Git LFS v1.3. I was able to build packages with the following:

$ DOCKER_LFS_BUILD_VERSION=linux-build-fixes ./build_dockers.bsh centos_6.dockerfile
$ docker run -v /path/to/git-lfs:/src -v /path/to/git-lfs/repos/centos/6:/repo --rm [docker-img]

Here's a summary of the changes:

  1. Using Go v1.6.3 across the board.
  2. Removed Centos 5 build. This hasn't worked for me since v1.1.0, and no one's asked for an rpm.
  3. Changed the build directories to be valid GOPATHs, and set the GOPATH correctly.
  4. Update the debian script to call dpkg-buildpackage in separate directories. Leftovers from the first run caused the debian errors I saw.

EDIT: Replaced the rpm-go-vendor-fixes branch with linux-build-fixes, which has cleaned up commits and a PR: git-lfs/git-lfs#1398

@ttaylorr
Copy link
Contributor

This is awesome. I watched yesterday while @technoweenie worked on this and helped where I could, so I'm on board with this diff. So glad that this part of our build process is up to speed with the vendoring changes (which I should have checked when I made them 😅 ).

👍

@technoweenie
Copy link
Contributor Author

Actually, there still a few problems:

First, the centos docker image builds error when running build_rpms.bsh, build successfully:

Installed:
  rubygem-hpricot.x86_64 0:0.8.6-1.el7    rubygem-mustache.noarch 0:1.0.1-1.el7
  rubygem-rdiscount.x86_64 0:2.1.8-1.el7  rubygem-ronn.noarch 0:0.7.3-1.el7

Complete!

pushd ${CURDIR}/..
+ pushd /tmp/docker_setup/src/github.com/github/git-lfs/rpm/..
/tmp/docker_setup/src/github.com/github/git-lfs /tmp/docker_setup/src/github.com/github/git-lfs/rpm
  #Yes, compile lfs before compiling lfs...
  ./script/bootstrap
+ ./script/bootstrap
package main
    imports github.com/github/git-lfs/lfs
    imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm: must be imported as _nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm
package main
    imports github.com/github/git-lfs/lfs
    imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm
    imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4: must be imported as _nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4
package main
    imports github.com/github/git-lfs/lfs
    imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm
    imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/log4go: must be imported as _nuts/github.com/ThomsonReutersEikon/log4go
package main
    imports github.com/github/git-lfs/lfs
    imports github.com/github/git-lfs/vendor/_nuts/github.com/cheggaaa/pb: must be imported as _nuts/github.com/cheggaaa/pb
package main
    imports github.com/github/git-lfs/lfs
    imports github.com/github/git-lfs/vendor/_nuts/github.com/olekukonko/ts: must be imported as _nuts/github.com/olekukonko/ts
package main
    imports github.com/github/git-lfs/lfs
    imports github.com/github/git-lfs/vendor/_nuts/github.com/rubyist/tracerx: must be imported as _nuts/github.com/rubyist/tracerx
 ---> 0187de0d53b6
Removing intermediate container d89dac0d5709
Step 11 : COPY centos_script.bsh /tmp/
 ---> f13dc66253ae
Removing intermediate container 95651084e70c

I think this is fine, and we could actually split build_rpms.bsh into two scripts. I think all the docker image needs to do is setup go and ruby. I'll probably do this in a separate PR later.

Second, I get these intermittent errors installing during the initial apt-get run on the debian images:

Get:190 http://httpredir.debian.org/debian/ jessie/main dh-golang all 1.6 [8464 B]
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/liba/libauthen-sasl-perl/libauthen-sasl-perl_2.1600-1_all.deb  Error reading from server. Remote end closed connection [IP: 128.31.0.66 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Not sure there's much I can do about it, other than retrying the debian builds.

@technoweenie
Copy link
Contributor Author

Merging this so I can push to docker hub 🤘

@technoweenie technoweenie merged commit b89b1bf into git-lfs:master Jul 27, 2016
@technoweenie technoweenie deleted the lfs-1.3-fixes branch July 27, 2016 23:03
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 27, 2022
In commit b560b85 of PR git-lfs#1298 and in
commit git-lfs/build-dockers@64a3a9f of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5, so we can
remove the logic in our rpm/build_rpms.bsh which installed a RedHat
EPEL package only on this platform.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 27, 2022
Since the original introduction of the rpm/build_rpms.bsh script in
commit 4a71627 of PR git-lfs#332 it has
checked for the absence of the "go" binary and, if it is not found,
installs the golang package, except on CentOS 5 where fetches and
patches a golang.spec file and then builds a local RPM using that
in order to install Go.

However, in commit b560b85 of PR git-lfs#1298 and
in commit git-lfs/build-dockers@64a3a9f of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5.

And in commit 88430de of PR git-lfs#654 we
updated our CentOS Dockerfiles (before they were moved to the
git-lfs/build-dockers repository) to download and install Go from the
googleapis.com service, and we still continue to do this but as of
commit git-lfs/build-dockers@c638503
in PR git-lfs/build-dockers#35 we now use the golang.org service.

This direct download obviates the logic in our rpm/build_rpms.bsh
script to install the golang package, and the special handling for
CentOS 5 is also obsolete, so we remove this logic from our script.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 27, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 27, 2022
Since the original introduction of the rpm/build_rpms.bsh script in
commit 4a71627 of PR git-lfs#332 it has
checked for the absence of the "go" binary and, if it is not found,
installs the golang package, except on CentOS 5 where fetches and
patches a golang.spec file and then builds a local RPM using that
in order to install Go.

However, in commit b560b85 of PR git-lfs#1298 and
in commit git-lfs/build-dockers@64a3a9f of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5.

And in commit 88430de of PR git-lfs#654 we
updated our CentOS Dockerfiles (before they were moved to the
git-lfs/build-dockers repository) to download and install Go from the
googleapis.com service, and we still continue to do this but as of
commit git-lfs/build-dockers@c638503
in PR git-lfs/build-dockers#35 we now use the golang.org service.

This direct download obviates the logic in our rpm/build_rpms.bsh
script to install the golang package, and the special handling for
CentOS 5 is also obsolete, so we remove this logic from our script.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 28, 2022
In commit b560b85 of PR git-lfs#1298 and in
commit git-lfs/build-dockers@64a3a9f of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5, so we can
remove the logic in our rpm/build_rpms.bsh which installed a RedHat
EPEL package only on this platform.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 28, 2022
Since the original introduction of the rpm/build_rpms.bsh script in
commit 4a71627 of PR git-lfs#332 it has
checked for the absence of the "go" binary and, if it is not found,
installs the golang package, except on CentOS 5 where fetches and
patches a golang.spec file and then builds a local RPM using that
in order to install Go.

However, in commit b560b85 of PR git-lfs#1298 and
in commit git-lfs/build-dockers@64a3a9f of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5.

And in commit 88430de of PR git-lfs#654 we
updated our CentOS Dockerfiles (before they were moved to the
git-lfs/build-dockers repository) to download and install Go from the
googleapis.com service, and we still continue to do this but as of
commit git-lfs/build-dockers@c638503
in PR git-lfs/build-dockers#35 we now use the golang.org service.

This direct download obviates the logic in our rpm/build_rpms.bsh
script to install the golang package, and the special handling for
CentOS 5 is also obsolete, so we remove this logic from our script.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 28, 2022
We no longer support either CentOS 5 or 6, per commit
b560b85 of PR git-lfs#1298 and commit
git-lfs/build-dockers@64a3a9f
of PR git-lfs/build-dockers#3, and commit
git-lfs/build-dockers@898d9b0
of PR git-lfs/build-dockers#33.

We also now build the Asciidoctor Ruby gem in order to generate
our man pages, rather than using ronn and several other gems,
per commit db9a821 of PR git-lfs#5054.

We therefore update the documentation for our RPM package build
utilities and for our Docker container image build utilities to
reflect these changes.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Dec 28, 2022
We no longer support either CentOS 5 or 6, per commit
b560b85 of PR git-lfs#1298 and commit
git-lfs/build-dockers@64a3a9f
of PR git-lfs/build-dockers#3, and commit
git-lfs/build-dockers@898d9b0
of PR git-lfs/build-dockers#33.

We also now build the Asciidoctor Ruby gem in order to generate
our man pages, rather than using ronn and several other gems,
per commit db9a821 of PR git-lfs#5054.

We therefore update the documentation for our RPM package build
utilities and for our Docker container image build utilities to
reflect these changes.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 28, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
chrisd8088 added a commit to chrisd8088/build-dockers that referenced this pull request Dec 28, 2022
In commit 27eed9b of PR git-lfs#3 the
debian_script.bsh script was updated to replace several references
to a fixed /repo output directory with the REPO_DIR variable, including
in the final chown command.  However, the same change was not made
in the centos_script.bsh script, so we make it now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants