diff options
| author | Matthew Hicks <mhicks@mhicks-host.usersys.redhat.com> | 2008-06-23 15:06:37 -0400 |
|---|---|---|
| committer | Matthew Hicks <mhicks@mhicks-host.usersys.redhat.com> | 2008-06-24 08:08:25 -0400 |
| commit | 4ec70ff34acf9ef7733cf6dc606a147a9c3ca9bd (patch) | |
| tree | b410d5426238f27edba0eb031e67c13f01de829d | |
| parent | 4b539425989d8c3d10a24a988175be5ba850bbec (diff) | |
| download | tools-4ec70ff34acf9ef7733cf6dc606a147a9c3ca9bd.tar.gz tools-4ec70ff34acf9ef7733cf6dc606a147a9c3ca9bd.tar.xz tools-4ec70ff34acf9ef7733cf6dc606a147a9c3ca9bd.zip | |
Tools cleanup
30 files changed, 937 insertions, 340 deletions
diff --git a/cloudmasterd/Manifest.txt b/cloudmasterd/Manifest.txt index c734bd7..6060f4e 100644 --- a/cloudmasterd/Manifest.txt +++ b/cloudmasterd/Manifest.txt @@ -14,6 +14,7 @@ extra/cloudmasterd.conf extra/cloudmasterd.redhat extra/cloudmasterd.spec lib/cloudmasterd.rb +lib/cloudmasterd/syncer.rb lib/cloudmasterd/version.rb log/debug.log primedb.rb diff --git a/cloudmasterd/bin/cloudmasterd-sync b/cloudmasterd/bin/cloudmasterd-sync index f30a6c4..1681bb0 100755 --- a/cloudmasterd/bin/cloudmasterd-sync +++ b/cloudmasterd/bin/cloudmasterd-sync @@ -1,142 +1,10 @@ #!/usr/bin/ruby require 'rubygems' -require 'open3' -require 'sqlite3' -require 'active_record' +require 'cloudmasterd/syncer' -# This is needed to let a 'kill PID' command cleanly -# kill the process without requiring -9 -Signal.trap("TERM") do - # Clean up any active record connections - ActiveRecord::Base.remove_connection - - # Cleanly exit - exit 0 -end - -def parse_hosts(func_stderr) - hosts = [] - func_stderr.split("\n").each do |host_line| - # Handle a remote exception coming from a disconnected host - if host_line.index("remote exception") then - hosts.pop() - else - hosts << host_line.split(":")[1][2..-1] - end - end - return hosts -end - -def sync_memory - current_state = {} - Open3.popen3("func '*' call virt freemem") do |stdin, stdout, stderr| - hosts = parse_hosts(stderr.read) - - # Parse out the machines that belong to each host and zip them together in a hash - stdout.read.split("\n").each_with_index do |memory, index| - current_state[hosts[index]] = memory - end - end - - Cloud.transaction do - # Sync up the DB state - delete everything first - Cloud.delete_all - - # Create the current entries - current_state.each do |host, memory| - Cloud.create :name => host, :memory => memory - end - end -end - -def sync_state - current_state = {} - Open3.popen3("func '*' call virt state") do |stdin, stdout, stderr| - hosts = parse_hosts(stderr.read) - - # Parse out the machines that belong to each host and zip them together in a hash - stdout.read.split("\n").each_with_index do |host, index| - host[1..-2].split(", ").each do |machine| - name, state = machine[1..-2].split(" ") - current_state[name] = {:state => state, :cloud => hosts[index]} unless name == "Domain-0" - end - end - end - - # Sync up the state for all the machines - Machine.find(:all).each do |machine| - if current_state.has_key?(machine.name) then - # We have a current state match for this machine - machine.update_attributes(:cloud => current_state[machine.name][:cloud], :state => current_state[machine.name][:state]) - - # Delete the key so we can determine unaccounted for machines - current_state.delete(machine.name) - else - # Not good - the machine in the DB isn't locateable - machine.update_attribute(:state, "missing") - end - end - - # We need to create an 'unknown' instance for all the remaining keys - current_state.each do |name, machine| - Machine.create :name => name, :email => "unknown", :cloud => machine[:cloud], :state => machine[:state] - end -end - -def sync_owners - # Sync up any unowned machines that now have an owner (handles race condition with syncing states) - unowned_machines = {} - Machine.find(:all, :conditions => "email = 'unknown'").each do |machine| - unowned_machines[machine.name] = machine - end - - owned_machines = {} - Machine.find(:all, :conditions => "email <> 'unknown'").each do |machine| - owned_machines[machine.name] = machine - end - - owned_machines.each do |name, machine| - if unowned_machines.has_key?(name) then - # Delete the unowned machine and update the owned one - u_machine = unowned_machines[name] - machine.update_attributes(:cloud => u_machine.cloud, :state => u_machine.state) - u_machine.destroy() - end - end -end - -# Wait until the DB is there to establish the connection -until File.exists?("/var/lib/cloudmaster.db") do - sleep 10 -end - -ActiveRecord::Base.logger = Logger.new('/var/log/cloudmasterd-sync.log', 5, 1024000) -ActiveRecord::Base.colorize_logging = false - -# Setup the database connection -ActiveRecord::Base.establish_connection( - :adapter => "sqlite3", - :dbfile => "/var/lib/cloudmaster.db" -) - -class Machine < ActiveRecord::Base - set_table_name "cloudmasterd_machine" -end - -class Cloud < ActiveRecord::Base - set_table_name "cloudmasterd_cloud" -end - -# Constantly keep the database in sync +syncer = Syncer.new() while true do - begin - sync_memory - sync_state - sync_owners - rescue Exception => e - puts "ERROR: An error occured during syncing - #{e.to_s}" - end - + syncer.run sleep 5 end diff --git a/cloudmasterd/extra/cloudmasterd.redhat b/cloudmasterd/extra/cloudmasterd.redhat index dd276a8..0021f44 100755 --- a/cloudmasterd/extra/cloudmasterd.redhat +++ b/cloudmasterd/extra/cloudmasterd.redhat @@ -19,6 +19,7 @@ CTL=cloudmasterd-ctl case "$1" in start) echo -n $"Starting cloudmasterd: " + rm /var/tmp/cloudmasterd.lock &> /dev/null /usr/bin/cloudmasterd-sync & $CTL start RETVAL=$? diff --git a/cloudmasterd/extra/cloudmasterd.spec b/cloudmasterd/extra/cloudmasterd.spec index 2fb4924..7d77ac8 100644 --- a/cloudmasterd/extra/cloudmasterd.spec +++ b/cloudmasterd/extra/cloudmasterd.spec @@ -6,10 +6,10 @@ Summary: daemon for machine configuration Name: rubygem-%{gemname} -Version: 0.1.10 +Version: 1.0.0 Release: 1%{?dist} Group: Development/Languages -License: GPLv2+ or Ruby +License: GPLv2 URL: http://cloudmasterd.rubyforge.org Source0: %{gemname}-%{version}.gem BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) diff --git a/cloudmasterd/lib/cloudmasterd.rb b/cloudmasterd/lib/cloudmasterd.rb index d82f165..b4cbf08 100644 --- a/cloudmasterd/lib/cloudmasterd.rb +++ b/cloudmasterd/lib/cloudmasterd.rb @@ -1,7 +1,3 @@ -$: << File.dirname(File.expand_path(__FILE__)) - -gem 'reststop', '~> 0.2' - require 'yaml' require 'fileutils' require 'rubygems' @@ -12,6 +8,7 @@ require 'restr' require 'xmlrpc/client' require 'sqlite3' require 'open3' +require 'cloudmasterd/syncer' Camping.goes :Cloudmasterd Cloudmasterd.picnic! @@ -137,37 +134,44 @@ module Cloudmasterd::Controllers email = input.email cobbler_profile = _get_cobbler_profile(machine_fqdn, repo) - @host = _get_best_host(cobbler_profile["virt_file_size"], cobbler_profile["virt_ram"]) - begin - _koan(@host, machine_fqdn, repo) + # Synchronize access before making the func calls + Syncer::lock do + @host = _get_best_host(cobbler_profile["virt_file_size"], cobbler_profile["virt_ram"]) + + begin + _koan(@host, machine_fqdn, repo) - Machine.create :name => machine_fqdn, :email => email, :cloud => @host, :state => "Installing" - render :_koan - rescue Exception => e - @exception = e - render :_error + Machine.create :name => machine_fqdn, :email => email, :cloud => @host, :state => "Installing" + render :_koan + rescue Exception => e + @exception = e + render :_error + end end end def destroy(name) puts "Destroying image #{name}" - Machine.find(:all, :conditions => "name = '#{name}'").each do |machine| - # If the machine is missing, don't bother remotely trying to cleanup - unless machine.state == "missing" then - # Destroy the virtual machine - `func "#{machine.cloud}" call command run "virsh destroy #{machine.name}"` - `func "#{machine.cloud}" call command run "virsh undefine #{machine.name}"` - - # Remove the auto start file if it exists - `func "#{machine.cloud}" call command run "rm -rf /etc/xen/auto/#{machine.name}"` - - # Remove the image file - `func "#{machine.cloud}" call command run "rm -rf /images/#{machine.name}-disk0"` - end - # Delete the DB record - machine.destroy + Syncer::lock do + Machine.find(:all, :conditions => "name = '#{name}'").each do |machine| + # If the machine is missing, don't bother remotely trying to cleanup + unless machine.state == "missing" then + # Destroy the virtual machine + `func "#{machine.cloud}" call command run "virsh destroy #{machine.name}"` + `func "#{machine.cloud}" call command run "virsh undefine #{machine.name}"` + + # Remove the auto start file if it exists + `func "#{machine.cloud}" call command run "rm -rf /etc/xen/auto/#{machine.name}"` + + # Remove the image file + `func "#{machine.cloud}" call command run "rm -rf /images/#{machine.name}-disk0"` + end + + # Delete the DB record + machine.destroy + end end redirect R(Status) diff --git a/cloudmasterd/lib/cloudmasterd/syncer.rb b/cloudmasterd/lib/cloudmasterd/syncer.rb new file mode 100644 index 0000000..3e9d493 --- /dev/null +++ b/cloudmasterd/lib/cloudmasterd/syncer.rb @@ -0,0 +1,171 @@ +#!/usr/bin/ruby + +require 'rubygems' +require 'open3' +require 'sqlite3' +require 'active_record' + +# This is needed to let a 'kill PID' command cleanly +# kill the process without requiring -9 +Signal.trap("TERM") do + # Clean up any active record connections + ActiveRecord::Base.remove_connection + + # Cleanly exit + exit 0 +end + +# Define the ActiveRecord classes +class Machine < ActiveRecord::Base + set_table_name "cloudmasterd_machine" +end + +class Cloud < ActiveRecord::Base + set_table_name "cloudmasterd_cloud" +end + +class Syncer + # This method makes a simple attempt to provide some locking + def self.lock + lockfile = '/var/tmp/cloudmasterd.lock' + + begin + # Wait until the lock is released + while File.exists?(lockfile) do + sleep 0.5 + end + + # Obtain the lock + File.open(lockfile, "w") {|file| file.puts Thread.object_id.to_s} + + # Make sure the lock is ours - otherwise retry + retry unless File.open(lockfile, "r").readline.chomp. == Thread.object_id.to_s + + # Do the lock processing + yield + ensure + # Make sure to delete the lock + File.delete(lockfile) + end + end + + def parse_hosts(func_stderr) + hosts = [] + func_stderr.split("\n").each do |host_line| + # Handle a remote exception coming from a disconnected host + if host_line.index("remote exception") then + hosts.pop() + else + hosts << host_line.split(":")[1][2..-1] + end + end + return hosts + end + + def sync_memory + current_state = {} + Open3.popen3("func '*' call virt freemem") do |stdin, stdout, stderr| + hosts = parse_hosts(stderr.read) + + # Parse out the machines that belong to each host and zip them together in a hash + stdout.read.split("\n").each_with_index do |memory, index| + current_state[hosts[index]] = memory + end + end + + Cloud.transaction do + # Sync up the DB state - delete everything first + Cloud.delete_all + + # Create the current entries + current_state.each do |host, memory| + Cloud.create :name => host, :memory => memory + end + end + end + + def sync_state + current_state = {} + Open3.popen3("func '*' call virt state") do |stdin, stdout, stderr| + hosts = parse_hosts(stderr.read) + + # Parse out the machines that belong to each host and zip them together in a hash + stdout.read.split("\n").each_with_index do |host, index| + host[1..-2].split(", ").each do |machine| + name, state = machine[1..-2].split(" ") + current_state[name] = {:state => state, :cloud => hosts[index]} unless name == "Domain-0" + end + end + end + + # Sync up the state for all the machines + Machine.find(:all).each do |machine| + if current_state.has_key?(machine.name) then + # We have a current state match for this machine + machine.update_attributes(:cloud => current_state[machine.name][:cloud], :state => current_state[machine.name][:state]) + + # Delete the key so we can determine unaccounted for machines + current_state.delete(machine.name) + else + # Not good - the machine in the DB isn't locateable + machine.update_attribute(:state, "missing") + end + end + + # We need to create an 'unknown' instance for all the remaining keys + current_state.each do |name, machine| + Machine.create :name => name, :email => "unknown", :cloud => machine[:cloud], :state => machine[:state] + end + end + + def sync_owners + # Sync up any unowned machines that now have an owner (handles race condition with syncing states) + unowned_machines = {} + Machine.find(:all, :conditions => "email = 'unknown'").each do |machine| + unowned_machines[machine.name] = machine + end + + owned_machines = {} + Machine.find(:all, :conditions => "email <> 'unknown'").each do |machine| + owned_machines[machine.name] = machine + end + + owned_machines.each do |name, machine| + if unowned_machines.has_key?(name) then + # Delete the unowned machine and update the owned one + u_machine = unowned_machines[name] + machine.update_attributes(:cloud => u_machine.cloud, :state => u_machine.state) + u_machine.destroy() + end + end + end + + def run + # Wait until the DB is there to establish the connection + until File.exists?("/var/lib/cloudmaster.db") do + sleep 10 + end + + ActiveRecord::Base.logger = Logger.new('/var/log/cloudmasterd-sync.log', 5, 1024000) + ActiveRecord::Base.colorize_logging = false + + # Setup the database connection + ActiveRecord::Base.establish_connection( + :adapter => "sqlite3", + :dbfile => "/var/lib/cloudmaster.db" + ) + + # Constantly keep the database in sync + while true do + begin + Syncer::lock { sync_memory } + Syncer::lock { sync_state } + Syncer::lock { sync_owners } + rescue Exception => e + puts "ERROR: An error occured during syncing - #{e.to_s}" + end + + sleep 5 + end + end +end diff --git a/cloudmasterd/lib/cloudmasterd/version.rb b/cloudmasterd/lib/cloudmasterd/version.rb index d618c1c..d25021f 100644 --- a/cloudmasterd/lib/cloudmasterd/version.rb +++ b/cloudmasterd/lib/cloudmasterd/version.rb @@ -1,8 +1,8 @@ module Cloudmasterd #:nodoc: module VERSION #:nodoc: - MAJOR = 0 - MINOR = 1 - TINY = 10 + MAJOR = 1 + MINOR = 0 + TINY = 0 STRING = [MAJOR, MINOR, TINY].join('.') end diff --git a/everest-dsl/.gitignore b/everest-dsl/.gitignore deleted file mode 100644 index 3e57bca..0000000 --- a/everest-dsl/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.swp -*.swo -pkg/* diff --git a/everest-dsl/History.txt b/everest-dsl/History.txt deleted file mode 100644 index 7bb5120..0000000 --- a/everest-dsl/History.txt +++ /dev/null @@ -1,2 +0,0 @@ -== 0.1.0 / 2008-01-18 - * Birthday! diff --git a/everest-dsl/LICENSE b/everest-dsl/LICENSE new file mode 100644 index 0000000..8764452 --- /dev/null +++ b/everest-dsl/LICENSE @@ -0,0 +1,305 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executablt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this sectioclaims; this section has the sole purpose of +protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for thM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT +WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any lils. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/everest-dsl/Manifest.txt b/everest-dsl/Manifest.txt deleted file mode 100644 index 8e7364c..0000000 --- a/everest-dsl/Manifest.txt +++ /dev/null @@ -1,14 +0,0 @@ -.gitignore -History.txt -Manifest.txt -README.txt -Rakefile -ext/rubygem-everest-dsl.spec -lib/everest-dsl.rb -lib/everest-dsl/machines.rb -lib/everest-dsl/version.rb -test/data/sparse-dsl.rb -test/data/typical-dsl.rb -test/everest-test.rb -test/test_sparse_dsl.rb -test/test_typical_dsl.rb diff --git a/everest-dsl/README b/everest-dsl/README new file mode 100644 index 0000000..8916233 --- /dev/null +++ b/everest-dsl/README @@ -0,0 +1,4 @@ +everest-dsl +=========== + +A gem that provides the domain specific language support the Everest machine types diff --git a/everest-dsl/README.txt b/everest-dsl/README.txt deleted file mode 100644 index c079afb..0000000 --- a/everest-dsl/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -everest-bootstrap - by it-arch - -== DESCRIPTION: - -This is a provisioning too for IT puppet machines. - -== FEATURES/PROBLEMS: - -* CLI interface - -== SYNOPSIS: - - everest-bootstrap -h - -== INSTALL: - -* sudo gem/yum install everest-bootstrap - -== LICENSE: - -(The MIT License) - -Copyright (c) 2007 FIX - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/everest-dsl/Rakefile b/everest-dsl/Rakefile index 4c58585..369e920 100644 --- a/everest-dsl/Rakefile +++ b/everest-dsl/Rakefile @@ -1,18 +1,47 @@ -# -*- ruby -*- - require 'rubygems' -require 'hoe' -require './lib/everest-dsl/version.rb' +require 'rake/gempackagetask' +require 'rubygems/specification' +require 'date' + +GEM = "everest-dsl" +GEM_VERSION = "1.0.0" +AUTHOR = "Brenton Leanhardt" +EMAIL = "bleanhar@redhat.com" +HOMEPAGE = "https://fedorahosted.org/everest" +SUMMARY = "A gem that provides the dsl functionality for the everest machine types" + +spec = Gem::Specification.new do |s| + s.name = GEM + s.version = GEM_VERSION + s.platform = Gem::Platform::RUBY + s.has_rdoc = true + s.extra_rdoc_files = ["README", "LICENSE", 'TODO'] + s.summary = SUMMARY + s.description = s.summary + s.author = AUTHOR + s.email = EMAIL + s.homepage = HOMEPAGE + + # Uncomment this to add a dependency + # s.add_dependency "foo" + + s.require_path = 'lib' + s.autorequire = GEM + s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*") +end -Hoe.new('everest-dsl', EverestDsl::Version::STRING) do |p| - p.author = 'Brenton Leanhardt' - p.email = "bleanhar@redhat.com" - p.rubyforge_name = 'everest' - p.summary = 'Library for Everest machine types domain specific language' - p.description = 'Library for Everest machine types domain specific language' - # p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1] - p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") - #p.extra_deps = %w[highline] +Rake::GemPackageTask.new(spec) do |pkg| + pkg.gem_spec = spec end -# vim: syntax=Ruby +desc "install the gem locally" +task :install => [:package] do + sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}} +end + +desc "create a gemspec file" +task :make_spec do + File.open("#{GEM}.gemspec", "w") do |file| + file.puts spec.to_ruby + end +end diff --git a/everest-dsl/TODO b/everest-dsl/TODO new file mode 100644 index 0000000..bc60bf4 --- /dev/null +++ b/everest-dsl/TODO @@ -0,0 +1 @@ +TODO: diff --git a/everest-dsl/ext/rubygem-everest-dsl.spec b/everest-dsl/extra/rubygem-everest-dsl.spec index a07e0fc..85e3d7b 100644 --- a/everest-dsl/ext/rubygem-everest-dsl.spec +++ b/everest-dsl/extra/rubygem-everest-dsl.spec @@ -1,6 +1,6 @@ %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") %define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) -%define gemname everest +%define gemname everest-dsl %define geminstdir %{gemdir}/gems/%{gemname}-%{version} Summary: Everest Machine Type Domain Specific Language @@ -9,7 +9,7 @@ Name: rubygem-%{gemname} Version: 1.0.0 Release: 1%{?dist} Group: Applications/System -License: GPL+ +License: GPLv2+ Source0: %{gemname}-%{version}.gem BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) Requires: rubygems diff --git a/everest-dsl/lib/everest-dsl/version.rb b/everest-dsl/lib/everest-dsl/version.rb index 0b0cea2..19454d6 100644 --- a/everest-dsl/lib/everest-dsl/version.rb +++ b/everest-dsl/lib/everest-dsl/version.rb @@ -1,8 +1,8 @@ module EverestDsl module Version - MAJOR = 0 - MINOR = 1 - BUILD = 6 + MAJOR = 1 + MINOR = 0 + BUILD = 0 STRING = [MAJOR, MINOR, BUILD].join(".") end diff --git a/everest-dsl/script/destroy b/everest-dsl/script/destroy new file mode 100755 index 0000000..40901a8 --- /dev/null +++ b/everest-dsl/script/destroy @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) + +begin + require 'rubigen' +rescue LoadError + require 'rubygems' + require 'rubigen' +end +require 'rubigen/scripts/destroy' + +ARGV.shift if ['--help', '-h'].include?(ARGV[0]) +RubiGen::Base.use_component_sources! [:newgem_simple, :test_unit] +RubiGen::Scripts::Destroy.new.run(ARGV) diff --git a/everest-dsl/script/generate b/everest-dsl/script/generate new file mode 100755 index 0000000..5c8ed01 --- /dev/null +++ b/everest-dsl/script/generate @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) + +begin + require 'rubigen' +rescue LoadError + require 'rubygems' + require 'rubigen' +end +require 'rubigen/scripts/generate' + +ARGV.shift if ['--help', '-h'].include?(ARGV[0]) +RubiGen::Base.use_component_sources! [:newgem_simple, :test_unit] +RubiGen::Scripts::Generate.new.run(ARGV) diff --git a/everest-dsl/spec/everest-dsl_spec.rb b/everest-dsl/spec/everest-dsl_spec.rb new file mode 100644 index 0000000..de5c778 --- /dev/null +++ b/everest-dsl/spec/everest-dsl_spec.rb @@ -0,0 +1,7 @@ +require File.dirname(__FILE__) + '/spec_helper' + +describe "everest-dsl" do + it "should do nothing" do + true.should == true + end +end
\ No newline at end of file diff --git a/everest-dsl/spec/spec_helper.rb b/everest-dsl/spec/spec_helper.rb new file mode 100644 index 0000000..8eee1f2 --- /dev/null +++ b/everest-dsl/spec/spec_helper.rb @@ -0,0 +1,2 @@ +$TESTING=true +$:.push File.join(File.dirname(__FILE__), '..', 'lib') diff --git a/everest-dsl/test/everest-test.rb b/everest-dsl/test/everest-test.rb index 493ddab..32efa24 100644 --- a/everest-dsl/test/everest-test.rb +++ b/everest-dsl/test/everest-test.rb @@ -1,4 +1,4 @@ -module EverestDslTest +module EverestTest def assert_machine(name, num_facts, num_classes, globals=true) m = machines.find {|m| m.name == name} assert_globals(m) if globals diff --git a/everest-dsl/test/test_sparse_dsl.rb b/everest-dsl/test/test_sparse_dsl.rb index 08ae041..87206bd 100644 --- a/everest-dsl/test/test_sparse_dsl.rb +++ b/everest-dsl/test/test_sparse_dsl.rb @@ -1,5 +1,5 @@ -require 'everest-dsl/machines' -require 'everest-test' +require 'lib/everest-dsl/machines' +require 'test/everest-test' require 'test/unit' # We have to do this before including the module @@ -8,7 +8,7 @@ EverestDsl::EverestDsl[:machine_types_file] = File.dirname(__FILE__) + "/data/sp class TestSparseDsl < Test::Unit::TestCase include EverestDsl - include EverestDslTest + include EverestTest def test_dsl_load assert_equal(machines.size, 1) diff --git a/everest-dsl/test/test_typical_dsl.rb b/everest-dsl/test/test_typical_dsl.rb index eb75fe3..077c9eb3 100644 --- a/everest-dsl/test/test_typical_dsl.rb +++ b/everest-dsl/test/test_typical_dsl.rb @@ -1,5 +1,5 @@ -require 'everest-dsl/machines' -require 'everest-test' +require 'lib/everest-dsl/machines' +require 'test/everest-test' require 'test/unit' # We have to do this before including the module @@ -7,7 +7,7 @@ EverestDsl::EverestDsl[:machine_types_file] = File.dirname(__FILE__) + "/data/ty class TestTypicalDsl < Test::Unit::TestCase include EverestDsl - include EverestDslTest + include EverestTest def test_dsl_load assert_equal(8, machines.size) diff --git a/everestd/History.txt b/everestd/History.txt index 59ce905..299b64d 100644 --- a/everestd/History.txt +++ b/everestd/History.txt @@ -1,4 +1,2 @@ -== 0.0.1 2008-04-09 - -* 1 major enhancement: - * Initial release +== 1.0.0-1 2008-06-23 +* Initial Release diff --git a/everestd/License.txt b/everestd/License.txt index 7a2ed3c..8764452 100644 --- a/everestd/License.txt +++ b/everestd/License.txt @@ -1,20 +1,305 @@ -Copyright (c) 2008 Brenton Leanhardt - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executablt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this sectioclaims; this section has the sole purpose of +protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for thM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT +WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any lils. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/everestd/Manifest.txt b/everestd/Manifest.txt index 13316cf..b10ef72 100644 --- a/everestd/Manifest.txt +++ b/everestd/Manifest.txt @@ -1,3 +1,4 @@ +.gitignore History.txt License.txt Manifest.txt @@ -9,6 +10,7 @@ config.example.yml config/hoe.rb config/requirements.rb extra/everestd.redhat +extra/everestd.spec lib/everestd.rb lib/everestd/version.rb log/debug.log diff --git a/everestd/README.txt b/everestd/README.txt index 8af6938..2066192 100644 --- a/everestd/README.txt +++ b/everestd/README.txt @@ -1,48 +1,2 @@ = everestd - -* FIX (url) - -== DESCRIPTION: - -FIX (describe your package) - -== FEATURES/PROBLEMS: - -* FIX (list of features or problems) - -== SYNOPSIS: - - FIX (code sample of usage) - -== REQUIREMENTS: - -* FIX (list of requirements) - -== INSTALL: - -* FIX (sudo gem install, anything else) - -== LICENSE: - -(The MIT License) - -Copyright (c) 2008 FIX - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file +* Everest Repository daemon for machine configuration diff --git a/everestd/extra/everestd.spec b/everestd/extra/everestd.spec index e3e2915..054bfa2 100644 --- a/everestd/extra/everestd.spec +++ b/everestd/extra/everestd.spec @@ -4,27 +4,26 @@ %define gemname everestd %define geminstdir %{gemdir}/gems/%{gemname}-%{version} -Summary: daemon for machine configuration +Summary: Everest Repository daemon for machine configuration Name: rubygem-%{gemname} -Version: 0.1.1 -Release: 6%{?dist} -Group: Development/Languages -License: GPLv2+ or Ruby -URL: http://everestd.rubyforge.org +Version: 1.0.0 +Release: 1%{?dist} +Group: Applications/System +License: GPLv2+ +URL: http://fedorahosted.org/everest Source0: %{gemname}-%{version}.gem BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: rubygems Requires: rubygem(picnic) Requires: rubygem(activesupport) Requires: rubygem(reststop) >= 0.2.1 -Requires: rubygem(everest) +Requires: rubygem(everest-dsl) BuildRequires: rubygems BuildArch: noarch Provides: rubygem(%{gemname}) = %{version} %description -daemon for machine configuration - +Everest Repository daemon for machine configuration %prep @@ -63,5 +62,5 @@ rm -rf %{buildroot} /etc/init.d/everestd %changelog -* Thu Apr 24 2008 <bleanhar@bleanhar-jboss-dev.usersys.redhat.com> - 0.1.0-1 -- Initial package +* Mon Jun 23 2008 <bleanhar@redhat.com> - 1.0.0-1 +- 1.0 Release diff --git a/everestd/lib/everestd/version.rb b/everestd/lib/everestd/version.rb index 9f493ff..2fe37e1 100644 --- a/everestd/lib/everestd/version.rb +++ b/everestd/lib/everestd/version.rb @@ -1,8 +1,8 @@ module Everestd #:nodoc: module VERSION #:nodoc: - MAJOR = 0 - MINOR = 1 - TINY = 1 + MAJOR = 1 + MINOR = 0 + TINY = 0 STRING = [MAJOR, MINOR, TINY].join('.') end |
