Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on CentOS #313

Merged
merged 10 commits into from
Jun 17, 2015
Merged

Conversation

andyneff
Copy link
Contributor

The build script for CentOS could not build the man pages on CentOS 6 since ruby 2 is not available. However, there is a way to get ruby via the RVM. That has been added in so that CentOS 6 can build the man pages using this script

Getting golang on CentOS 5 isn't really a "supported" idea, but I looked into a number of work arounds and settled on the simplest one. I saw it mentioned in the comments and gave it a try. If you would rather say NO to CentOS 5, I can remove that, but I can also say that this will build and run git-lfs on a a CentOS 5 Machine (Tested on a 5.11 VM).

Also add the ability to use a currently cloned version of git-lfs, so it does not always clone into /tmp

@technoweenie
Copy link
Contributor

As someone that doesn't use CentOS, and is not even much of a devops person, PRs like this are difficult to review. I'll probably ping you on any issues we get on these scripts, so I'd love any further help you can provide. I think eventually I'd like to setup some VMs for running QA checks on stuff like this before we release.

/cc @jsh, author of the CentOS install script.

@andyneff
Copy link
Contributor Author

@technoweenie Not a problem. Just let me know when you got an issue, and I'll see if I can help. CentOS is my primary OS of choice ;) So I'm definitely testing that!

@technoweenie
Copy link
Contributor

@andyneff: can you confirm this works with master? We've made some major changes (see #345). Looks like it should just work though.

@andyneff
Copy link
Contributor Author

@technoweenie You'll have to forgive me relative lack of experience with go, but... Now that you've removed the symlink, how is this supposed to build now?

on 47f7350, scripts/bootstrap fails stating

script/build.go:13:2: cannot find package "github.com/github/git-lfs/lfs" in any of:
        /usr/lib/golang/src/github.com/github/git-lfs/lfs (from $GOROOT)
        ($GOPATH not set

which is the import ("github.com/github/git-lfs/commands") line. So... where is that import?

Centos 7.1.1503 (should be the easiest case)

@technoweenie
Copy link
Contributor

Gah, I should add this to the readme or contributing guide. Go projects expect you to clone the repository to $GOPATH. Its directory tree should look like this:

- src
  - github.com
    - github
      - git-lfs
- pkg
  (go build artifacts)
- bin
  (compiled go apps)
...

I just use $HOME/go as my GOPATH.

@technoweenie
Copy link
Contributor

Here's a great way to get started hacking on Git LFS, and really any Go project:

  1. Install Go 1.3+
  2. Make sure $GOPATH is set (I use $HOME/go).
  3. Run go get github.com/github/git-lfs.
  4. Optional: Symlink $GOPATH/src/github.com/github/git-lfs to your project directory if you have one.
  5. Run go install github.com/github/git-lfs to build, or script/bootstrap from the project directory.

@andyneff
Copy link
Contributor Author

Well... Thank you for the hand holding, I needed it apparently... let me just rant say that IS a paradigm I'm not used to, the repo != the build structure... And using golang like that enforces that... (by checking out the repo into this other build structure)... I do not like... but that is not a discussion for git-lfs, it looks like that is golang's fault.

So this brings me to the inevitable question now, what is the purpose/scope of these scripts? Because BEFORE, they had two features (intended or not)

  1. I could git clone the repo, and run that script, and everything builds
  2. I could download JUST the script, it clones the repo for me, and everything builds

But as I see it now, the only course of action is to
a) Follow the 5 steps @technoweenie Gave me, and then run it and it will work

Which makes lines 37-39 pointless (in their current state)

So what do you want this to do now?

@technoweenie
Copy link
Contributor

You're right, the new setup is a bit of a regression. Getting this to actually work on Windows (no more symlinking) is worth it IMO.

I would say option 1 is the primary goal of these scripts.

On CentOS 6, it will download the rvm and install the latest stable ruby release
Tested on a BARE MINIMUM CentOS 6.6/6.5 chroot with nothing but yum installed
Tested against a CentOS 5.11 chroot
Using go built on CentOS 6, CentOS 5 is able to build git-lfs
It appears to work.
This no longer depends on my sf binaries for download, but I
don't think anyone is going to accept the solution. While it is
better, and includes all the RHEL patches, I am sure someone or
EVERYONE will say "Its too complciated" etc..." Better find a
simplier solution without all the patches
Simple patch to go src to build on CentOS 5
Cleaned up a little
Remove prompt for ruby on Centos 7
Tested on CentOS 5.11, 6.6, 7.1.1503
@andyneff
Copy link
Contributor Author

@technoweenie Ok, I have 1 working again. I went ahead add took your suggested optional step 4 and added a symlink myself. I guess whomever writes a similar windows script could do the same thing, but with a junction? Just guessing. At any rate, it all works now.

@technoweenie technoweenie mentioned this pull request Jun 11, 2015
38 tasks
@michael-k michael-k mentioned this pull request Jun 14, 2015
technoweenie added a commit that referenced this pull request Jun 17, 2015
@technoweenie technoweenie merged commit f1350be into git-lfs:master Jun 17, 2015
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.

None yet

2 participants