Skip to content

Commit 21a76f7

Browse files
committed
Merge pull request #5 from feedforce/add-vagrantfile
Add vagrantfile
2 parents 2574953 + e426a0c commit 21a76f7

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.vagrant

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,35 @@
33
Forked from imeyer's ruby-1.9.2-rpm project at https://github.com/imeyer/ruby-1.9.2-rpm and updated for 2.0.0.
44

55
This spec is an attempt to push for a stable replacement of Ruby 1.8.x with 1.9.2+ on RHEL based systems. The original author based it off of the work of [FrameOS](http://www.frameos.org) specs for Ruby 1.9.2 and Ruby Enterprise Edition.
6+
7+
# A example to make {SRPM,RPM}
8+
9+
You need to install [VirtualBox](https://www.virtualbox.org/) and [Vagrant](http://www.vagrantup.com/).
10+
11+
```
12+
$ vagrant up
13+
$ vagrant ssh
14+
$ mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
15+
$ (cd ~/rpmbuild/SOURCES && curl -LO http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz)
16+
$ cp /vagrant/ruby21x.spec ~/rpmbuild/SPECS
17+
$ sudo yum update -y
18+
$ sudo yum install -y rpm-build
19+
$ rpmbuild -ba ~/rpmbuild/SPECS/ruby21x.spec
20+
エラー: ビルド依存性の失敗:
21+
readline-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
22+
ncurses-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
23+
gdbm-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
24+
glibc-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
25+
gcc は ruby-2.1.2-2.el6.x86_64 に必要とされています
26+
openssl-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
27+
db4-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
28+
libyaml は ruby-2.1.2-2.el6.x86_64 に必要とされています
29+
libyaml-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
30+
libffi-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
31+
zlib-devel は ruby-2.1.2-2.el6.x86_64 に必要とされています
32+
$ sudo yum install -y readline-devel ncurses-devel gdbm-devel glibc-devel gcc openssl-devel db4-devel libyaml libyaml-devel libffi-devel zlib-devel
33+
$ rpmbuild -ba ~/rpmbuild/SPECS/ruby21x.spec
34+
(snip)
35+
書き込み完了: /home/vagrant/rpmbuild/SRPMS/ruby-2.1.2-2.el6.src.rpm
36+
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/ruby-2.1.2-2.el6.x86_64.rpm
37+
```

Vagrantfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5+
VAGRANTFILE_API_VERSION = "2"
6+
7+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8+
config.vm.box = "chef/centos-6.5"
9+
config.vm.network "private_network", ip: "192.168.33.24"
10+
config.cache.scope = :box if Vagrant.has_plugin? 'vagrant-cachier'
11+
end

0 commit comments

Comments
 (0)