GithubHelp home page GithubHelp logo

Comments (7)

fletchowns avatar fletchowns commented on May 8, 2024

Actually, looks like the git::source recipe installs the gettext-devel package, which install the ancient version of git.

$ sudo yum install gettext-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: repos.lax.quadranet.com
 * epel: mirror.sjc02.svwh.net
 * extras: mirrors.xmission.com
 * updates: mirrors.ocf.berkeley.edu
Resolving Dependencies
--> Running transaction check
---> Package gettext-devel.x86_64 0:0.18.2.1-4.el7 will be installed
--> Processing Dependency: git for package: gettext-devel-0.18.2.1-4.el7.x86_64
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-6.el7_2.1 will be installed
--> Processing Dependency: perl-Git = 1.8.3.1-6.el7_2.1 for package: git-1.8.3.1-6.el7_2.1.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.3.1-6.el7_2.1.x86_64
--> Running transaction check
---> Package perl-Git.noarch 0:1.8.3.1-6.el7_2.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                     Arch                                                 Version                                                         Repository                                             Size
==============================================================================================================================================================================================================================================
Installing:
 gettext-devel                                               x86_64                                               0.18.2.1-4.el7                                                  base                                                  315 k
Installing for dependencies:
 git                                                         x86_64                                               1.8.3.1-6.el7_2.1                                               updates                                               4.4 M
 perl-Git                                                    noarch                                               1.8.3.1-6.el7_2.1                                               updates                                                53 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 4.7 M
Installed size: 24 M
Is this ok [y/d/N]:

from git.

jpSimkins avatar jpSimkins commented on May 8, 2024

I too am having this issue with CentOS 7.3. Does anyone know of a work-a-round? I need to be on at least version 2 but I am stuck with 1.8.3. Otherwise, I will have to drop this cookbook and just build a cookbook to build this installation manually.

from git.

fletchowns avatar fletchowns commented on May 8, 2024

@jpSimkins I am working around the issue with a small wrapper cookbook:

# remove the default out of date package
package "git" do
	action :remove
end

# install tk package so gitk and git gui work
package "tk"

# temporary workaround for https://github.com/chef-cookbooks/git/issues/110
directory "#{Chef::Config['file_cache_path']}/git-#{node["git"]["version"]}" do
	recursive true
	action :delete
end

include_recipe "git::source"

from git.

jpSimkins avatar jpSimkins commented on May 8, 2024

I have tried your wrapper and still no luck. I am not able to get any other version other then 1.8.3 installed.

Thanks, at this point I'll have to find another solution.

from git.

fletchowns avatar fletchowns commented on May 8, 2024

@jpSimkins Sorry to hear it didn't work for you. Are you able to share the converge log?

from git.

jpSimkins avatar jpSimkins commented on May 8, 2024

Thanks for a quick response. This is the log: https://gist.github.com/jpSimkins/4ab6dd25215de0e886eaa60503f6c129

I don't mind assisting you with this if you want. Also, I am very new to chef (but a veteran to system admin) so I wonder if maybe I am doing something wrong on my end... I am a little confused on how to use the source of this cookbook so I will show you my code. Perhaps it's just a noobie mistake.

Hopefully this will point something out:

attributes/default.rb

default['git']['version'] = '2.13.1'
default['git']['url'] = 'https://github.com/git/git/archive/v2.13.1.tar.gz'
default['git']['checksum'] = 'd3015a679aa2dc5ff2cc8839459cea15fb2644aaa6bb9cc18e835bba2087adab'

I am not using any GUI so I left out the tk package.
cookbook/git.rb

# remove the default out of date package
package "git" do
	action :remove
end

# temporary workaround for https://github.com/chef-cookbooks/git/issues/110
directory "#{Chef::Config['file_cache_path']}/git-#{node["git"]["version"]}" do
	recursive true
	action :delete
end

include_recipe "git::source"

# Is this needed?
git_client 'default' do
    provider Chef::Provider::GitClient::Source
    source_checksum node['git']['checksum']
    source_prefix node['git']['prefix']
    source_url format(node['git']['url'], version: node['git']['version'])
    source_use_pcre node['git']['use_pcre']
    source_version node['git']['version']
    action :install
end

Also, is it possible to have this cookbook install a repo in yum to install git that way? I don't think so but I wanted to confirm. Just a bit confused on how updates will happen for this.

Thanks

from git.

fletchowns avatar fletchowns commented on May 8, 2024

@jpSimkins I don't think the git_client is necessary. I don't have it, at least.

I also have default["git"]["prefix"] = "/usr" in the attributes that I set, can't remember why I added that though. May have something to do with getting the cookbook version to appear on the PATH though. How are you verifying the version of git that is installed after converge? What's the output of which git and echo $PATH ? Maybe /usr/local is not on there?

from git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.