summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
Commit message (Collapse)AuthorAgeFilesLines
...
* | Adding a 'close_all' method to the Log class.Luke Kanies2009-02-061-0/+7
| | | | | | | | | | | | This moves the code out of Daemon. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Rails serialization module to help serialize/unserialize some Puppet ObjectsBrice Figureau2009-02-061-0/+18
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix #1847 - Force re-examination of all files to generate correct indicesBrice Figureau2009-01-131-0/+1
| | | | | | | | | | | | | | This bug is in fact a RDoc issue. The work-around is to always force a full parse scan and not only what has changed. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix #1807 - make Puppet::Util::Package.versioncmp a module functionBrice Figureau2008-12-271-0/+2
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge branch '0.24.x'James Turnbull2008-12-273-3/+49
|\| | | | | | | | | Conflicts: CHANGELOG
| * Not using a temporary file when locking files for writing.Luke Kanies2008-12-151-9/+6
| | | | | | | | | | | | | | | | | | | | The temporary file was not actually useful, because we could never really get atomic renames, for annoying, complicated reasons. This hopefully finally fixes #1812. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Preparing to fix #1812 - Moving locking code to a moduleLuke Kanies2008-12-122-2/+51
| | | | | | | | | | | | | | This moves the locking code out of Puppet::Util into a separate module, to make the code cleaner. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fix #1815 - puppetdoc --all crash on resource overrideBrice Figureau2008-12-101-1/+1
| |
* | Canonicalizing Setting section names to symbols.Luke Kanies2008-12-181-14/+14
| | | | | | | | | | | | | | | | | | I thought I was already using symbols everywhere so it didn't matter, but there are a few places (e.g., the process name) where they were strings, and that made things not work so much. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Deprecating the Puppet::Type.create.Luke Kanies2008-12-181-1/+1
| | | | | | | | | | | | | | This method is no longer necessary; you can use the normal 'new' class method. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Finishing the work to use Puppet::Resource instead of TransObjectLuke Kanies2008-12-181-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | This was a complicated project because TransObject had made its way into too many classes. The usage by Util::Settings was particularly nefarious. Refactoring and fixing this exposed some other issues. The main complication, though, was the extent to which the Puppet::Type class depended on TransObject. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Supporting a nil expirer on cacher objects.Luke Kanies2008-12-181-1/+8
| | | | | | | | | | | | | | | | | | | | This works for those classes like Puppet::Type that use an expirer that isn't always present (they use their catalog as an expirer). The behaviour is now that if there is no expirer, expire() is a no-op and all data is considered expired all the time, so it's always fresh. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring the Settings class to use Puppet::ResourceLuke Kanies2008-12-181-174/+69
| | | | | | | | | | | | | | It also now uses the Catalog instead of the recursive TransObject stuff. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-12-029-145/+2839
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/puppetca lib/puppet/type/group.rb lib/puppet/type/tidy.rb lib/puppet/util/settings.rb Also edited the following files so tests will pass: lib/puppet/type/component.rb spec/unit/ssl/certificate_request.rb spec/unit/type/computer.rb spec/unit/type/mcx.rb spec/unit/type/resources.rb spec/unit/util/settings.rb spec/unit/util/storage.rb test/ral/type/zone.rb
| * Refactoring the thread-safety in Puppet::Util a bit.Luke Kanies2008-11-261-21/+27
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #1683 - accessing and changing settings is now thread-safe.Luke Kanies2008-11-261-140/+144
| | | | | | | | | | | | Applying patch by Matt Palmer. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Moved RRD feature from util/metric.rb to feature/base.rbJames Turnbull2008-11-171-5/+0
| |
| * Manifest documentation generationBrice Figureau2008-11-175-0/+2621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is currently two type of documentation generation for manifests (module or modulepath): * RDoc HTML generation for modules and global manifests * console output for sole manifest Both version handles classes, defines, nodes, global variable assignements, and resources when --all is used. The usage is the following: For the rdoc variant: $ puppetdoc --mode rdoc --outputdir doc It uses the puppet.conf configuration file to get the modulepath and manifestdir settings. Those are overridable on the command line with --modulepath and --manifestdir. For the console output version: $ puppetdoc /path/to/manifests Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fix bug #1681: Add filesystem type check to test for per-file SELinux ↵Sean E. Millichamp2008-11-141-0/+64
| | | | | | | | context support
| * Fixes relating to transition to native SELinux bindingsSean E. Millichamp2008-11-141-2/+9
| |
| * Refactoring of SELinux functions to use native Ruby SELinux interfaceSean E. Millichamp2008-11-141-66/+67
| |
| * Fixes #1672 - unsafe crontab handling in SolarisMartin Englund2008-11-051-3/+3
| | | | | | | | Signed-off-by: Martin Englund <martin@englund.nu>
* | Adding caching support to parameters, and using cached attributes for file ↵Luke Kanies2008-11-111-0/+6
| | | | | | | | | | | | | | | | | | source and metadata. As hoped, this drastically simplifies the code around retaining this data. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Allowing a nil expirer for caching classes.Luke Kanies2008-11-111-1/+2
| | | | | | | | | | | | | | If there's no expirer, then the value is regenerated every time. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring the Cacher interface to always require attribute declaration.Luke Kanies2008-11-111-64/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously you could dynamically use cached values, but the new interface requires a single static declaration of the attribute: cached_attr(:myattr) { my_init_code() } This is cleaner, because it makes it easy to turn the code into an init method and generally makes the whole thing easier to think about. Most of this commit is going through the different classes that already using the Caching engine. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies2008-11-111-4/+8
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing a critical bug in the Cacher module.Luke Kanies2008-11-111-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, the first generated value was always considered expired the next time it was asked for. The fix was to create an initial timestamp in the Cacher module, thus providing a floor for validity. This is definitely a murky bug, and is especially hard to test. Also refactoring the internals just a bit. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing the PGraph class and subsuming it into SimpleGraph.Luke Kanies2008-11-061-2/+2
| | | | | | | | | | | | | | This class is a holdover from when I was using GRATR, and it's obsolete now. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a method to Checksums to extract the sum typeLuke Kanies2008-11-051-0/+9
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-10-311-16/+1
|\| | | | | | | | | | | Conflicts: CHANGELOG
| * Fixing #1698 - all logs again show up in the report.Luke Kanies2008-10-281-16/+1
| |
* | Merge branch '0.24.x'Luke Kanies2008-10-221-2/+11
|\| | | | | | | | | | | Conflicts: lib/puppet/type/user.rb
| * Fix regression caused by switch to Puppet's execute() functionsSean E. Millichamp2008-10-221-2/+11
| |
* | Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-177-53/+216
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | since that method is deprecated. Conflicts: CHANGELOG bin/puppetca lib/puppet/file_serving/fileset.rb lib/puppet/network/xmlrpc/client.rb lib/puppet/type/file/selcontext.rb spec/unit/file_serving/metadata.rb spec/unit/type/file.rb
| * Use fully qualified paths when calling binaries, adjust chcon call to use ↵Sean E. Millichamp2008-10-171-8/+2
| | | | | | | | Puppet's execute() function.
| * Setting SELinux contexts with chcon should not dereference symbolic linksSean E. Millichamp2008-10-171-2/+2
| |
| * Revert "Added last part of #1633 patch - update to util/metrics.rb"James Turnbull2008-10-101-5/+0
| | | | | | | | This reverts commit c5d1a4f6ffe72477ce02358a93d48df850aea15b.
| * Added last part of #1633 patch - update to util/metrics.rbJames Turnbull2008-10-101-0/+5
| |
| * Add unit test coverage for Puppet::Util::SELinux and fix problems found by testsSean E. Millichamp2008-10-091-13/+30
| |
| * Fix scenario when SELinux support tools exist, but SELinux is disabledSean E. Millichamp2008-10-081-0/+6
| |
| * New and improved tests for file type SELinux contextsSean E. Millichamp2008-10-081-1/+1
| |
| * Adding an array indexer method to Puppet::Util::Metric as requested in #1633.Luke Kanies2008-10-081-0/+9
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Adding partial spec tests for Puppet::Util::Metric.Luke Kanies2008-10-081-9/+14
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Doing some simple refactorings on Puppet::LogLuke Kanies2008-10-041-14/+7
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #1089 - Log messages are now tagged with the log level,Luke Kanies2008-10-041-0/+3
| | | | | | | | | | | | making it easier to match messages in the 'tagmail' report. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Adding rspec tests for the Puppet::Util::Log class.Luke Kanies2008-10-041-16/+11
| | | | | | | | | | | | | | Also using Puppet::Util::Tagging to handle the tagging, rather than custom methods. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Add SELinux context reset after file writes in Puppet::Util::FileTypeSean E. Millichamp2008-10-031-0/+7
| |
| * Refactor SELinux commands to utility moduleSean E. Millichamp2008-10-031-0/+113
| |
| * Fixed #1613 - The client environment will be substituted when looking up ↵Luke Kanies2008-10-031-3/+5
| | | | | | | | | | | | | | | | | | | | settings. This won't be perfect, because it still requires that the caller pass in an environment, but for every case that an environment is passed in, that environment will be substituted into settings when possible. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Adding user_attr util to parse attributes on solarisAndrew Shafer2008-10-011-0/+21
| | | | | | | | read /etc/user_attr and makes a hash based on the file contents