Comments (7)
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.
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.
@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.
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.
@jpSimkins Sorry to hear it didn't work for you. Are you able to share the converge log?
from git.
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.
@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)
- undefined method `provides' for Chef::Provider::GitClient::Osx:Class
- Provide an option to also install man pages?
- Funky % parsing for attributes breaks basic Windows usage HOT 3
- package_version doesn't install the specified version HOT 2
- NoMethodError-> undefined method `set' for Chef::Platform:Class HOT 6
- References to default versions in README.md need to be modified HOT 1
- git 6.1.0 seems to be broken with latest chef client? HOT 4
- getting issue while installing git on a node from chefdk HOT 1
- Checkout modifies mtimes HOT 1
- not pulling the latest git version HOT 2
- No need to download sources if the installed version is same as expected version. HOT 2
- suggestion: Install from kernel.org and verify GPG signatures HOT 3
- cookbook requires 13.0+ instead of 12.7+ HOT 3
- STDERR: No provider of 'git=2.26.2-27.36.1' found. HOT 3
- MacOS need the option to overwrite the previously installed Git client
- wrong package name on smartos
- Windows PATH bug
- Dependency Dashboard
- ### :speaking_head
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.