summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
Commit message (Collapse)AuthorAgeFilesLines
* Fixing #1541 - ParsedFile only backs up files once per transactionLuke Kanies2009-02-131-1/+0
| | | | | | | | This moves responsibility for backups from the filetype to the consumer of the filetype, but only ParsedFile actually uses filetypes. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing the apparently obsolete netinfo filetype.Luke Kanies2009-02-131-88/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrated FileType tests to spec, and fleshed them out a bit.Luke Kanies2009-02-131-3/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1869 - autoloaded files should never leak exceptionsLuke Kanies2009-02-121-2/+2
| | | | | | | | | | | | | Ruby's exception hierarchy is a bit strange, in that only exceptions that sub RuntimeError are caught by default. This patch explicitly catches the base class, Exception, which means that LoadError, SyntaxError, and any RuntimeErrors will all be caught. This is done for both load() and loadall(); load() uses Kernel.load, but loadall() uses Kernel.require. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1538 - Yumrepo sets permissions wrongly on files in /etc/yum.repos.dJames Turnbull2009-02-111-0/+1
|
* Prefetching, and thus purging, Nagios resources now worksLuke Kanies2009-02-111-0/+4
| | | | | | | | | | | *only* if you use the default configuration file locations. In the end, this was a relatively minor change; most of the actual diff centers around making the code more readable so I could think my way into the fix, and adding tests for cases that were either untested or refactored slightly. 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>
* 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
|
* 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>
* Fixing #1698 - all logs again show up in the report.Luke Kanies2008-10-281-16/+1
|
* Fix regression caused by switch to Puppet's execute() functionsSean E. Millichamp2008-10-221-2/+11
|
* 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
* Fixed #791 - You should now be able to create and find a user/group in one ↵Luke Kanies2008-10-021-12/+10
| | | | | | | | | | | | | transaction. The real problem was that the 'gid' and 'uid' methods didn't handle the case where 'get_posix_field' didn't return a value, and the subsequent 'get_posix_field' calls couldn't handle that. This commit moves the tests for Posix to spec, and fixes the specific bug. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1521 -- ldap user and group are now used with the default connectionLuke Kanies2008-09-171-1/+11
| | | | | | when available. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1553 - Puppet and Facter cannot both install the plist module into ↵James Turnbull2008-09-133-474/+0
| | | | two different locations
* Removed reference to namespaces from --genconfig documentationJames Turnbull2008-08-211-4/+0
|
* Fixed #1441 - Updated console coloursJames Turnbull2008-08-011-14/+22
|
* Ensure that we consistently use either string #{} interpolation or String.%Daniel Pittman2008-08-011-1/+1
| | | | | | | interpolation, not both, to avoid issues where a #{} interpolated value contains a % character. Signed-off-by: Daniel Pittman <daniel@rimspace.net>
* Feature #1241 : Improve performance of group lookupsJames Turnbull2008-07-291-14/+67
|
* Merge branch 'tickets/0.24.x/1231' of git://github.com/lak/puppet into 0.24.xJames Turnbull2008-07-051-2/+4
|\
| * Fixed #1231 - Exceptions during startup should now be clear.Luke Kanies2008-07-041-2/+4
| | | | | | | | | | | | | | This will often result in duplicate information, but at least the information will now always be there. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removed debugging from lib/puppet/util/ldap/connection.rbJames Turnbull2008-07-041-1/+0
|/
* Adding an 'instance' class method to ldap connections.Luke Kanies2008-07-011-0/+13
| | | | | This just returns a Connection instance with the default ldap configuration information already provided.
* issue 1183Andrew Shafer2008-06-161-0/+58
| | | | | | | | | | | | | | | Added environment awareness to --configprint Pulled the logic for --configprint --genconfig and --genmanifest out of puppet.rb Put the logic in lib/puppet/util/settings.rb and refactored it a bit Added specs for the behavior Reformated the whole spec file to use nested describe Added the new method to the executables The old behavior should be preserved, except for the env is now used
* Applying the fixes recommended by David Schmitt to the inline documentation ofLuke Kanies2008-06-091-4/+4
| | | | the ResourceTemplate class.
* Updating the docs for ResourceTemplate.Luke Kanies2008-06-091-0/+23
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>