Skip to content

Commit

Permalink
Add support for Git client installation on Centos 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
reset authored and jtimberman committed Dec 8, 2011
1 parent 13944b2 commit a4e1be8
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 1 deletion.
11 changes: 11 additions & 0 deletions files/centos-5.5/mirrors-rpmforge
@@ -0,0 +1,11 @@
http://apt.sw.be/redhat/el5/en/$ARCH/rpmforge
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/rpmforge
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/rpmforge
#http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/$ARCH/rpmforge
http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/rpmforge
http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/rpmforge
http://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/rpmforge
http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/rpmforge
http://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/rpmforge
http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/rpmforge
http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/rpmforge
11 changes: 11 additions & 0 deletions files/centos-5.5/mirrors-rpmforge-extras
@@ -0,0 +1,11 @@
http://apt.sw.be/redhat/el5/en/$ARCH/extras
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/extras
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/extras
#http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/$ARCH/extras
http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/extras
http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/extras
http://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/extras
http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/extras
http://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/extras
http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/extras
http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/extras
11 changes: 11 additions & 0 deletions files/centos-5.5/mirrors-rpmforge-testing
@@ -0,0 +1,11 @@
http://apt.sw.be/redhat/el5/en/$ARCH/testing
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/testing
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/testing
#http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/$ARCH/testing
http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/testing
http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/testing
http://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/testing
http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/testing
http://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/testing
http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/testing
http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/testing
31 changes: 31 additions & 0 deletions files/centos-5.5/rpmforge.repo
@@ -0,0 +1,31 @@
### Name: RPMforge RPM Repository for RHEL 5 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
32 changes: 32 additions & 0 deletions files/centos/RPM-GPG-KEY-rpmforge-dag
@@ -0,0 +1,32 @@
The following public key can be used to verify RPM packages
downloaded from http://dag.wieers.com/apt/ using 'rpm -K'
if you have the GNU GPG package.
Questions about this key should be sent to:
Dag Wieers <dag@wieers.com>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.1 (GNU/Linux)

mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6
TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF
5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3
3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq
39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN
8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm
30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD
oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170
JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy
cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT
EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST
hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF
Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon
g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt
llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l
IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg
6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh
Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L
n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I
RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE
BACeJU1hpElFnUZCL4yKj4EuLnlo8kc=
=mqUt
-----END PGP PUBLIC KEY BLOCK-----
40 changes: 40 additions & 0 deletions libraries/helper.rb
@@ -0,0 +1,40 @@
module Git
module Helper
def register_rpmforge_repo
cookbook_file "/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag" do
source 'RPM-GPG-KEY-rpmforge-dag'
mode '0644'
end

execute "create-yum-cache" do
command "yum -q makecache"
action :nothing
end

ruby_block "reload-internal-yum-cache" do
block do
Chef::Provider::Package::Yum::YumCache.instance.reload
end
action :nothing
end

%w{ mirrors-rpmforge mirrors-rpmforge-extras mirrors-rpmforge-testing rpmforge.repo }.each do |repo_file|
cookbook_file "/etc/yum.repos.d/#{repo_file}" do
source repo_file
mode "0644"
notifies :run, resources(:execute => "create-yum-cache"), :immediately
notifies :create, resources(:ruby_block => "reload-internal-yum-cache"), :immediately
end
end

# Deleting a repo is similar but we have yum scrub it's cache to avoid any issues
execute "clean-yum-cache" do
command "yum clean all"
action :nothing
end
end
end
end

Chef::Recipe.send(:include, Git::Helper)

2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -7,7 +7,7 @@
recipe "git", "Installs git"
recipe "git::server", "Sets up a runit_service for git daemon"

%w{ ubuntu debian arch}.each do |os|
%w{ ubuntu debian arch centos }.each do |os|
supports os
end

Expand Down
4 changes: 4 additions & 0 deletions recipes/default.rb
Expand Up @@ -19,6 +19,10 @@
case node[:platform]
when "debian", "ubuntu"
package "git-core"
when "centos"
register_rpmforge_repo

package "git"
else
package "git"
end

0 comments on commit a4e1be8

Please sign in to comment.