openshift-origin-dns-bind 0.8.12 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ require 'openshift-origin-common'
2
+
3
+ Broker::Application.configure do
4
+ conf_file = File.join(OpenShift::Config::PLUGINS_DIR, File.basename(__FILE__, '.rb') + '.conf')
5
+ if Rails.env.development?
6
+ dev_conf_file = File.join(OpenShift::Config::PLUGINS_DIR, File.basename(__FILE__, '.rb') + '-dev.conf')
7
+ if File.exist? dev_conf_file
8
+ conf_file = dev_conf_file
9
+ else
10
+ Rails.logger.info "Development configuration for #{File.basename(__FILE__, '.rb')} not found. Using production configuration."
11
+ end
12
+ end
13
+ conf = OpenShift::Config.new(conf_file)
14
+
15
+ config.dns = {
16
+ :server => conf.get("BIND_SERVER", "127.0.0.1"),
17
+ :port => conf.get("BIND_PORT", "53").to_i,
18
+ :keyname => conf.get("BIND_KEYNAME", "example.com"),
19
+ :keyvalue => conf.get("BIND_KEYVALUE", "base64-encoded key, most likely from /var/named/example.com.key."),
20
+ :zone => conf.get("BIND_ZONE", "example.com")
21
+ }
22
+ end
@@ -0,0 +1,7 @@
1
+ require 'openshift-origin-controller'
2
+ require 'rails'
3
+
4
+ module OpenShift
5
+ class BindDnsEngine < Rails::Engine
6
+ end
7
+ end
@@ -2,9 +2,9 @@ require "openshift-origin-common"
2
2
 
3
3
  module OpenShift
4
4
  module BindDnsModule
5
- require 'openshift-origin-dns-bind/engine/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
5
+ require 'bind_dns_engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
6
6
  end
7
7
  end
8
8
 
9
- require "openshift-origin-dns-bind/lib/openshift/bind_plugin.rb"
9
+ require "openshift/bind_plugin.rb"
10
10
  OpenShift::DnsService.provider=OpenShift::BindPlugin
@@ -1,24 +1,26 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ config_dir = File.join(File.join("config", "**"), "*")
2
3
  $:.push File.expand_path("../lib", __FILE__)
3
4
  lib_dir = File.join(File.join("lib", "**"), "*")
4
5
  test_dir = File.join(File.join("test", "**"), "*")
5
6
  bin_dir = File.join("bin", "*")
6
7
  doc_dir = File.join(File.join("doc", "**"), "*")
8
+ conf_dir = File.join(File.join("conf", "**"), "*")
7
9
  spec_file = "rubygem-openshift-origin-dns-bind.spec"
8
10
 
9
11
  Gem::Specification.new do |s|
10
12
  s.name = "openshift-origin-dns-bind"
11
- s.version = `rpm -q --qf "%{version}\n" --specfile #{spec_file}`.split[0]
12
- s.license = `rpm -q --qf "%{license}\n" --specfile #{spec_file}`.split[0]
13
+ s.version = `rpm -q --define 'rhel 7' --qf "%{version}\n" --specfile #{spec_file}`.split[0]
14
+ s.license = `rpm -q --define 'rhel 7' --qf "%{license}\n" --specfile #{spec_file}`.split[0]
13
15
  s.authors = ["Krishna Raman"]
14
16
  s.email = ["kraman@gmail.com"]
15
- s.homepage = `rpm -q --qf "%{url}\n" --specfile #{spec_file}`.split[0]
16
- s.summary = `rpm -q --qf "%{description}\n" --specfile #{spec_file}`.split[0]
17
- s.description = `rpm -q --qf "%{description}\n" --specfile #{spec_file}`.split[0]
17
+ s.homepage = `rpm -q --define 'rhel 7' --qf "%{url}\n" --specfile #{spec_file}`.split[0]
18
+ s.summary = `rpm -q --define 'rhel 7' --qf "%{description}\n" --specfile #{spec_file}`.split[0]
19
+ s.description = `rpm -q --define 'rhel 7' --qf "%{description}\n" --specfile #{spec_file}`.split[0]
18
20
 
19
21
  s.rubyforge_project = "openshift-origin-dns-bind"
20
22
 
21
- s.files = Dir[lib_dir] + Dir[doc_dir]
23
+ s.files = Dir[lib_dir] + Dir[doc_dir] + Dir[conf_dir] + Dir[config_dir]
22
24
  s.test_files = Dir[test_dir]
23
25
  s.executables = Dir[bin_dir]
24
26
  s.files += %w(README.md Rakefile Gemfile rubygem-openshift-origin-dns-bind.spec openshift-origin-dns-bind.gemspec LICENSE COPYRIGHT)
@@ -27,7 +29,7 @@ Gem::Specification.new do |s|
27
29
  s.add_dependency('openshift-origin-controller')
28
30
  s.add_dependency('json')
29
31
  s.add_dependency('dnsruby')
30
- s.add_development_dependency('rake')
32
+ s.add_development_dependency('rake', '>= 0.8.7', '<= 0.9.2.2')
31
33
  s.add_development_dependency('rspec')
32
34
  s.add_development_dependency('bundler')
33
35
  s.add_development_dependency('mocha')
@@ -1,139 +1,118 @@
1
- %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
2
- %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
3
- %global gemname openshift-origin-dns-bind
4
- %global geminstdir %{gemdir}/gems/%{gemname}-%{version}
1
+ %if 0%{?fedora}%{?rhel} <= 6
2
+ %global scl ruby193
3
+ %global scl_prefix ruby193-
4
+ %endif
5
+ %{!?scl:%global pkg_name %{name}}
6
+ %{?scl:%scl_package rubygem-%{gem_name}}
7
+ %global gem_name openshift-origin-dns-bind
8
+ %global rubyabi 1.9.1
5
9
 
6
10
  Summary: OpenShift plugin for BIND service
7
- Name: rubygem-%{gemname}
8
- Version: 0.8.12
11
+ Name: rubygem-%{gem_name}
12
+ Version: 1.1.1
9
13
  Release: 1%{?dist}
10
14
  Group: Development/Languages
11
15
  License: ASL 2.0
12
16
  URL: http://openshift.redhat.com
13
- Source0: rubygem-%{gemname}-%{version}.tar.gz
17
+ Source0: rubygem-%{gem_name}-%{version}.tar.gz
14
18
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15
- Requires: ruby(abi) >= 1.8
16
- Requires: rubygems
19
+ Requires: %{?scl:%scl_prefix}ruby(abi) = %{rubyabi}
20
+ Requires: %{?scl:%scl_prefix}ruby
21
+ Requires: %{?scl:%scl_prefix}rubygems
22
+ Requires: %{?scl:%scl_prefix}rubygem(json)
23
+ Requires: %{?scl:%scl_prefix}rubygem(dnsruby)
17
24
  Requires: rubygem(openshift-origin-common)
18
- Requires: rubygem(json)
19
25
  Requires: bind
20
26
  Requires: bind-utils
21
- Requires: rubygem(dnsruby)
22
27
  Requires: openshift-origin-broker
23
- Requires: selinux-policy-targeted
24
- Requires: policycoreutils-python
25
- Obsoletes: rubygem-uplift-bind-plugin
26
-
27
- BuildRequires: ruby
28
- BuildRequires: rubygems
28
+ Requires: selinux-policy-targeted
29
+ Requires: policycoreutils-python
30
+ %if 0%{?fedora}%{?rhel} <= 6
31
+ BuildRequires: ruby193-build
32
+ BuildRequires: scl-utils-build
33
+ %endif
34
+ BuildRequires: %{?scl:%scl_prefix}ruby(abi) = %{rubyabi}
35
+ BuildRequires: %{?scl:%scl_prefix}ruby
36
+ BuildRequires: %{?scl:%scl_prefix}rubygems
37
+ BuildRequires: %{?scl:%scl_prefix}rubygems-devel
29
38
  BuildArch: noarch
30
- Provides: rubygem(%{gemname}) = %version
31
-
32
- %package -n ruby-%{gemname}
33
- Summary: OpenShift plugin for Bind service
34
- Requires: rubygem(%{gemname}) = %version
35
- Provides: ruby(%{gemname}) = %version
39
+ Provides: rubygem(%{gem_name}) = %version
40
+ Obsoletes: rubygem-uplift-bind-plugin
36
41
 
37
42
  %description
38
43
  Provides a Bind DNS service based plugin
39
44
 
40
- %description -n ruby-%{gemname}
41
- Provides a Bind DNS service based plugin
42
-
43
45
  %prep
44
46
  %setup -q
45
47
 
46
48
  %build
49
+ %{?scl:scl enable %scl - << \EOF}
50
+ mkdir -p ./%{gem_dir}
51
+ # Create the gem as gem install only works on a gem file
52
+ gem build %{gem_name}.gemspec
53
+ export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
54
+ # gem install compiles any C extensions and installs into a directory
55
+ # We set that to be a local directory so that we can move it into the
56
+ # buildroot in %%install
57
+ gem install -V \
58
+ --local \
59
+ --install-dir ./%{gem_dir} \
60
+ --bindir ./%{_bindir} \
61
+ --force \
62
+ --rdoc \
63
+ %{gem_name}-%{version}.gem
64
+ %{?scl:EOF}
47
65
 
48
66
  %install
49
- rm -rf %{buildroot}
50
- mkdir -p %{buildroot}%{gemdir}
51
- mkdir -p %{buildroot}%{ruby_sitelib}
52
-
53
- # Build and install into the rubygem structure
54
- gem build %{gemname}.gemspec
55
- gem install --local --install-dir %{buildroot}%{gemdir} --force %{gemname}-%{version}.gem
56
-
57
- # Symlink into the ruby site library directories
58
- ln -s %{geminstdir}/lib/%{gemname} %{buildroot}%{ruby_sitelib}
59
- ln -s %{geminstdir}/lib/%{gemname}.rb %{buildroot}%{ruby_sitelib}
67
+ mkdir -p %{buildroot}%{gem_dir}
68
+ cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
60
69
 
61
70
  # Add documents/examples
62
71
  mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/
63
72
  cp -r doc/* %{buildroot}%{_docdir}/%{name}-%{version}/
64
73
 
74
+ #Config file
75
+ mkdir -p %{buildroot}/etc/openshift/plugins.d
76
+ cp %{buildroot}/%{gem_dir}/gems/%{gem_name}-%{version}/conf/openshift-origin-dns-bind.conf.example %{buildroot}/etc/openshift/plugins.d/openshift-origin-dns-bind.conf.example
77
+
65
78
  # Compile SELinux policy
66
79
  mkdir -p %{buildroot}/usr/share/selinux/packages/rubygem-openshift-origin-dns-bind
67
- cp %{buildroot}%{gemdir}/gems/openshift-origin-dns-bind-*/doc/examples/dhcpnamedforward.* %{buildroot}/usr/share/selinux/packages/rubygem-openshift-origin-dns-bind
80
+ cp %{buildroot}%{gem_dir}/gems/openshift-origin-dns-bind-*/doc/examples/dhcpnamedforward.* %{buildroot}/usr/share/selinux/packages/rubygem-openshift-origin-dns-bind
68
81
 
69
82
  %clean
70
83
  rm -rf %{buildroot}
71
84
 
72
85
  %files
73
86
  %defattr(-,root,root,-)
87
+ %doc %{gem_docdir}
74
88
  %doc %{_docdir}/%{name}-%{version}
75
- %dir %{geminstdir}
76
- %doc %{geminstdir}/Gemfile
77
- %{gemdir}/doc/%{gemname}-%{version}
78
- %{gemdir}/gems/%{gemname}-%{version}
79
- %{gemdir}/cache/%{gemname}-%{version}.gem
80
- %{gemdir}/specifications/%{gemname}-%{version}.gemspec
89
+ %{gem_instdir}
90
+ %{gem_spec}
91
+ %{gem_cache}
81
92
  /usr/share/selinux/packages/rubygem-openshift-origin-dns-bind
93
+ /etc/openshift/plugins.d/openshift-origin-dns-bind.conf.example
82
94
 
83
- %files -n ruby-%{gemname}
84
- %{ruby_sitelib}/%{gemname}
85
- %{ruby_sitelib}/%{gemname}.rb
86
95
 
87
96
  %changelog
97
+ * Fri Jan 11 2013 Troy Dawson <tdawson@redhat.com> 1.1.1-1
98
+ - updated gemspecs so they work with scl rpm spec files. (tdawson@redhat.com)
99
+ - F18 compatibility fixes - apache 2.4 - mongo journaling - JDK 7 -
100
+ parseconfig gem update Bugfix for Bind DNS plugin (kraman@gmail.com)
101
+ - add config to gemspec (dmcphers@redhat.com)
102
+ - Moving plugins to Rails 3.2.8 engine (kraman@gmail.com)
103
+ - getting specs up to 1.9 sclized (dmcphers@redhat.com)
104
+ - specifying rake gem version range (abhgupta@redhat.com)
105
+ - Moving broker config to /etc/openshift/broker.conf Rails app and all oo-*
106
+ scripts will load production environment unless the
107
+ /etc/openshift/development marker is present Added param to specify default
108
+ when looking up a config value in OpenShift::Config Moved all defaults into
109
+ plugin initializers instead of separate defaults file No longer require
110
+ loading 'openshift-origin-common/config' if 'openshift-origin-common' is
111
+ loaded openshift-origin-common selinux module is merged into F16 selinux
112
+ policy. Removing from broker %%postrun (kraman@gmail.com)
113
+
88
114
  * Tue Oct 23 2012 Brenton Leanhardt <bleanhar@redhat.com> 0.8.12-1
89
115
  - removing remaining cases of SS and config.ss (dmcphers@redhat.com)
90
116
  - Making openshift-origin-msg-broker-mcollective a Rails engine so that it can
91
117
  hook into Rails initializers Making openshift-origin-dns-bind a Rails engine
92
- so that it can hook into Rails initializers (kraman@gmail.com)
93
-
94
- * Thu Oct 11 2012 Brenton Leanhardt <bleanhar@redhat.com> 0.8.11-1
95
- - Centralize plug-in configuration (miciah.masters@gmail.com)
96
-
97
- * Tue Oct 09 2012 Brenton Leanhardt <bleanhar@redhat.com> 0.8.10-1
98
- - Merge pull request #613 from kraman/master (openshift+bot@redhat.com)
99
- - Module name and gem path fixes for auth plugins (kraman@gmail.com)
100
-
101
- * Mon Oct 08 2012 Dan McPherson <dmcphers@redhat.com> 0.8.9-1
102
- - Fixing obsoletes for openshift-origin-port-proxy (kraman@gmail.com)
103
-
104
- * Fri Oct 05 2012 Krishna Raman <kraman@gmail.com> 0.8.8-1
105
- - new package built with tito
106
-
107
- * Thu Aug 30 2012 Brenton Leanhardt <bleanhar@redhat.com> 0.8.7-1
108
- - adding dnsruby dependency in bind plugin gemspec and spec file
109
- (abhgupta@redhat.com)
110
-
111
- * Mon Aug 20 2012 Brenton Leanhardt <bleanhar@redhat.com> 0.8.6-1
112
- - gemspec refactorings based on Fedora packaging feedback (bleanhar@redhat.com)
113
- - allow ruby versions > 1.8 (mlamouri@redhat.com)
114
- - setup broker/nod script fixes for static IP and custom ethernet devices add
115
- support for configuring different domain suffix (other than example.com)
116
- Fixing dependency to qpid library (causes fedora package conflict) Make
117
- livecd start faster by doing static configuration during cd build rather than
118
- startup Fixes some selinux policy errors which prevented scaled apps from
119
- starting (kraman@gmail.com)
120
- - Removing requirement to disable NetworkManager so that liveinst works Adding
121
- initial support for dual interfaces Adding "xhost +" so that liveinst can
122
- continue to work after hostname change to broker.example.com Added delay
123
- befor launching firefox so that network is stable Added rndc key generation
124
- for Bind Dns plugin instead of hardcoding it (kraman@gmail.com)
125
- - Add modify application dns and use where applicable (dmcphers@redhat.com)
126
- - MCollective updates - Added mcollective-qpid plugin - Added mcollective-
127
- msg-broker plugin - Added mcollective agent and facter plugins - Added
128
- option to support ignoring node profile - Added systemu dependency for
129
- mcollective-client (kraman@gmail.com)
130
-
131
- * Wed May 30 2012 Krishna Raman <kraman@gmail.com> 0.8.5-1
132
- - Adding livecd build scripts Adding a text only minimal version of livecd
133
- Added ability to access livecd dns from outside VM (kraman@gmail.com)
134
-
135
- * Fri Apr 27 2012 Krishna Raman <kraman@gmail.com> 0.8.4-1
136
- - cleaning up spec files (dmcphers@redhat.com)
137
-
138
- * Sat Apr 21 2012 Krishna Raman <kraman@gmail.com> 0.8.3-1
139
- - new package built with tito
118
+ so that it can hook into Rails initializers (kraman@gmail.com)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openshift-origin-dns-bind
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
- - 0
8
- - 8
9
- - 12
10
- version: 0.8.12
7
+ - 1
8
+ - 1
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Krishna Raman
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-23 00:00:00 -04:00
18
+ date: 2013-01-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -68,10 +68,21 @@ dependencies:
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- hash: 3
71
+ hash: 49
72
72
  segments:
73
73
  - 0
74
- version: "0"
74
+ - 8
75
+ - 7
76
+ version: 0.8.7
77
+ - - <=
78
+ - !ruby/object:Gem::Version
79
+ hash: 11
80
+ segments:
81
+ - 0
82
+ - 9
83
+ - 2
84
+ - 2
85
+ version: 0.9.2.2
75
86
  type: :development
76
87
  version_requirements: *id004
77
88
  - !ruby/object:Gem::Dependency
@@ -126,10 +137,8 @@ extensions: []
126
137
  extra_rdoc_files: []
127
138
 
128
139
  files:
129
- - lib/openshift-origin-dns-bind/engine/engine.rb
130
- - lib/openshift-origin-dns-bind/config/initializers/openshift-origin-dns-bind.rb
131
- - lib/openshift-origin-dns-bind/config/initializers/openshift-origin-dns-bind-defaults.conf
132
- - lib/openshift-origin-dns-bind/lib/openshift/bind_plugin.rb
140
+ - lib/openshift/bind_plugin.rb
141
+ - lib/bind_dns_engine.rb
133
142
  - lib/openshift-origin-dns-bind.rb
134
143
  - doc/examples/Kexample.com.+157+37399.private
135
144
  - doc/examples/192.168.0.reverse.db
@@ -141,6 +150,8 @@ files:
141
150
  - doc/examples/dhclient-up-hooks
142
151
  - doc/examples/named.conf
143
152
  - doc/README.local_dns
153
+ - conf/openshift-origin-dns-bind.conf.example
154
+ - config/initializers/openshift-origin-dns-bind.rb
144
155
  - README.md
145
156
  - Rakefile
146
157
  - Gemfile
@@ -1,14 +0,0 @@
1
- require 'openshift-origin-common/config'
2
-
3
- Broker::Application.configure do
4
- conf = OpenShift::Config.new(File.join(OpenShift::Config::PLUGINS_DIR, File.basename(__FILE__, '.rb') + '.conf'))
5
- defaults = OpenShift::Config.new(File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb') + '-defaults.conf'))
6
-
7
- config.dns = {
8
- :server => conf.get("BIND_SERVER") || defaults.get("BIND_SERVER"),
9
- :port => (conf.get("BIND_PORT") || defaults.get("BIND_PORT")).to_i,
10
- :keyname => conf.get("BIND_KEYNAME") || defaults.get("BIND_KEYNAME"),
11
- :keyvalue => conf.get("BIND_KEYVALUE") || defaults.get("BIND_KEYVALUE"),
12
- :zone => conf.get("BIND_ZONE") || defaults.get("BIND_ZONE")
13
- }
14
- end
@@ -1,10 +0,0 @@
1
- require 'openshift-origin-controller'
2
- require 'rails'
3
-
4
- module OpenShift
5
- class BindDnsEngine < Rails::Engine
6
- paths.lib << "lib/openshift-origin-bind-dns/lib"
7
- paths.config << "lib/openshift-origin-bind-dns/config"
8
- config.autoload_paths += %W(#{config.root}/lib)
9
- end
10
- end