summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Improving fix for #1175; tightening thread safetyMarkus Roberts2010-02-173-10/+14
| | | | | | | | The previous code maintained thread safety up to work-duplication (so that a collision would, at worse, result in effective cache flushing and cause some additional work to be done). The preceding patch addressed the single thread issue of environment specific functions; this patch brings the thread safety up to the previous standard.
* Part 2 of fix for #1175 (functions in environments)Markus Roberts2010-02-177-43/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jesse and I are shooting for the minimal viable fix here, with the idea that a great deal of refactoring is needed but isn't appropriate at this time. The changes in this commit are: * Index the function-holding modules by environment * We need to know the "current environment" when we're defining a function so we can attach it to the proper module, and this information isn't dynamically available when user-defined functions are being created (we're being called by user written code that doesn't "know" about environments) so we cheat and stash the value in Puppet::Node::Environment * since we must do this anyway, it turns out to be cleaner & safer to do the same when we are evaluating a functon. This is the main change from the prior version of this patch. * Add a special *root* environment for the built in functions, and extend all scopes with it. * Index the function characteristics (name, type, docstring, etc.) by environment * Make the autoloader environment aware, so that it uses the modulepath for the specified environment rather than the default * Turn off caching of the modulepath since it potentially changes for each node * Tweak tests that weren't environment aware
* [#1621] Composite keys for resourcesJesse Wolfe2010-06-219-184/+116
| | | | | | | | | | | | | | | | This patch implements the fundamental pieces of the move to composite keys: * Instead of having a single namevar, we have a non-empty collection of them, and two resources are the same if and only if all of them match. Note that the present situation is a special case of this, where the collection always has exactly one member. * As currently, namevar is determined by the type. * Instead just of inferring the single namevar from the title we let types decompose the title into values for several (perhaps all) of the namevar components; note that the present situation is again a special case of this. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Use the 'root' feature rather than directly checking the uidMarkus Roberts2010-02-173-3/+3
| | | | Jesse fixed all these but David and others moved them and introduced some more so...
* variable name error in refactorJesse Wolfe2010-02-171-1/+1
|
* Remove over-eager error branch in a complicated IfJesse Wolfe2010-02-171-4/+0
|
* Confine out a lib that puppet was failing to load on non-win32Jesse Wolfe2010-02-171-1/+1
|
* Resolving conflicts with jes5199:ticket/master/2935-settings-modeMarkus Roberts2010-02-171-2/+8
| | | | | | Jesse moved the code David was patching; the conflict resolution omits David's change (since the code isn't there to be changed) and this moves the change to the new location.
* Fix Exec typeDavid Schmitt2010-02-171-2/+2
|
* Move syslog into a featureDavid Schmitt2010-02-172-3/+5
|
* Adapt Util::Storage specs and avoid trying to lock on directoriesDavid Schmitt2010-02-171-0/+4
|
* Relax path qualification check on FileServing::FilesetDavid Schmitt2010-02-171-1/+1
|
* Implement quoting on the exec commands and repair specsDavid Schmitt2010-02-171-22/+51
|
* Avoid trying to symlink() on windowsDavid Schmitt2010-02-172-2/+4
|
* Implement "forking" for WindowsDavid Schmitt2010-02-171-24/+46
|
* Avoid non-win32 signals on win32 runtimeDavid Schmitt2010-02-171-1/+4
|
* Avoid trying to set uid/gid on windowsDavid Schmitt2010-02-171-1/+2
|
* Start extracting the owner managment for files into providersDavid Schmitt2010-02-173-98/+194
|
* Expand file type to be able to handle Win32 and UNC pathsDavid Schmitt2010-02-171-6/+16
| | | | | | | Win32 paths start with a drive letter, a colon and a slash; UNC paths start with two slashes, the name of the server and another slash. Signed-off-by: David Schmitt <david@dasz.at>
* Updated version to 2.6.0James Turnbull2010-06-101-1/+1
|
* Make specs work on win32David Schmitt2010-02-172-4/+4
| | | | | | | | | | | | | | | | | | | | lib/: * Fix Puppet::Parser::Files * Fix Puppet::Util::Settings spec/: * unit/application/kick.rb: only run on posix * unit/application.rb * unit/parser/compiler.rb * unit/parser/files.rb * unit/resource.rb * unit/resource/catalog.rb * unit/resource/type_collection.rb * unit/transaction.rb * unit/type/tidy.rb * unit/util/settings.rb * unit/util/settings/file_setting.rb * unit/application.rb
* Fix path handlingDavid Schmitt2010-02-173-5/+6
| | | | | *) Use File.expand_path as indicator for being an absolute path *) Use basename instead of parsing the path manually
* Print stacktraces if requestedDavid Schmitt2010-02-171-0/+2
|
* Adapt defaults to Win32 environmentDavid Schmitt2010-02-171-1/+1
| | | | This needs the workaround from http://rubyforge.org/tracker/index.php?func=detail&aid=28206&group_id=85&atid=411
* More win32? feature defDavid Schmitt2010-02-171-1/+1
|
* Define posix and win32 featuresDavid Schmitt2010-02-171-0/+11
|
* Improve error messageDavid Schmitt2010-02-171-1/+1
|
* Avoid setting the timeout before we know which timeout we should set.David Schmitt2010-02-171-4/+4
| | | | Signed-off-by: David Schmitt <david@dasz.at>
* Avoid trying to lock on non-filesDavid Schmitt2010-02-171-0/+2
| | | | This is not supported on windows and makes little sense on POSIX
* Removing obsolete FCollection stub from FunctionsLuke Kanies2010-02-171-6/+0
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Functions are added to a module instead of ScopeLuke Kanies2010-02-172-3/+22
| | | | | | | | | | | | | | | | | We were previously adding them directly to Scope, but now they're in a module that Scope includes. This is the first half of #1175 - we can now maintain environment-specific collections of functions. We need some way of tracking which environment a given function is loaded from. Well, maybe it's the first third - the core functions probably need to be added to all of these modules, or there needs to be a 'common' module that is included by all of them. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Slightly restructuring "Functions" fileLuke Kanies2010-02-171-7/+4
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* [#3921] Add facts_terminus setting to Puppet settingsRein Henrichs2010-02-173-3/+5
| | | | * defaults to "facter"
* [#3921] Remove unnecessary require 'puppet/resource'Rein Henrichs2010-02-177-57/+55
| | | | | | * Remove require statements * explicity define namespace modules/classes for Puppet::Resource::Status to avoid require dependency cycle.
* Fix for #3949 and relatedMarkus Roberts2010-02-171-2/+3
| | | | | | | Syck/Yaml quietly passes on undefined classes as strings, so that if objects of those classes are loaded and re-serialized they passthrough unmodified. While not technically correct, it's still the POLS behavior, and we now support it.
* Fixed #3912 - Added client certificate name as an internal fact called ↵James Turnbull2010-02-171-0/+1
| | | | "clientcert"
* {#3866] Rename the method metaclass to singleton_class to avoid the ↵Matt Robinson2010-02-176-11/+11
| | | | | | | | | | | | deprecation warnings from Rails ActiveSupport The metaid.rb file came straight from why the lucky stiff's "seeing metaclasses clearly" article. Rails used this too, but they recently deprecated the name metaclass in favor of singleton_class to match what ruby-core decided to do. meta, eigen and singlton class were all suggested and in the end singleton was agreed upon. http://redmine.ruby-lang.org/issues/show/1082
* Fixing #3822 - checksums will be loaded from filebucketsLuke Kanies2010-02-171-18/+36
| | | | | | | | | | | | If you have the following code or equivalent: file { "/foo": content => "{md5}foobar" } Puppet will attempt to pull the content associated with that file from whatever the default filebucket is for the resource in question. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* fooLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* For #3822 - Reducing checksum code duplicationLuke Kanies2010-02-173-45/+72
| | | | | | | | | | | The FileBucket code had a bunch of checksum code that was already available in a library, and it used a checksum format (type + data) that was incompatible with what we were using everywhere else. This just fixes that code duplication. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixed unsupported perlstyle regex and few other minor bugsRoss West2010-02-171-26/+42
| | | | Signed-off-by: Ross West <westr@connection.ca>
* Signed-off-by: Ross West <westr@connection.ca>Ross West2010-02-171-202/+185
| | | | Code cleanup/spacing fixed
* Signed-off-by: Ross West <westr@connection.ca>Ross West2010-02-171-0/+252
| | | | | | | | | | | Description: - Initial submission of new freebsd package manager for ports (portupgrade.rb) Dependencies: - Ports system application (ports-mgmt/portupgrade) Notes: - Package[:name] needs to be the origin code of the port (eg: "ports-mgmt/portupgrade")
* Fixing #3791 - client environment is usedLuke Kanies2010-02-171-3/+19
| | | | | | | | | | | | | Node#environment wasn't being set correctly, in that it had to have the right answer out of the gate or it was never corrected. It was lazy-binding in 0.25 but I managed to make it no longer that way. This resulted in the environment basically not being set during compilation, so the default server environment was always used. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Bug #3748 LDAP group membershipMatt Robinson2010-02-171-1/+1
| | | | | | | | LDAP group membership comparison was happening on an unsorted string. Sorting the string for now, may want to do something smarter by comparing something other than strings later. Signed-off-by: Matt Robinson <matt@puppetlabs.com>
* Fix for 3664: interpolating qualified variables.Markus Roberts2010-02-171-9/+9
| | | | | | | | | | "${myclass::var}" was lexed as a CLASSNAME instead of a VARIABLE token, giving an error while parsing because a rvalue can't be a bare CLASSNAME token. This commit (based of Brice's) fixes it by restricting the contexts in which the CLASSNAME and CLASSREF tokens are acceptable, analagous with the handling for NAME tokens.
* Fix #3664 - qualified variable parsing in string interpolationBrice Figureau2010-02-171-4/+6
| | | | | | | | | | | "${myclass::var}" was lexed as a CLASSNAME instead of a VARIABLE token, giving an error while parsing because a rvalue can't be a bare CLASSNAME token. This patch fixes the issue by making VARIABLE lexing higher priority than CLASSNAME. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Feature #2935 remove misleading commentJesse Wolfe2010-02-171-4/+1
| | | | | | Remove a stale comment about how settings work Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #2935 Unify the codepaths for setting settingsJesse Wolfe2010-02-171-6/+14
| | | | | | | | | There are two codepaths for setting settings in the settings object: one for setting individual settings, and one was setting settings in mass, like in the system settings file. This patch unifies some of that logic. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #2935 Puppet[:mode] and Puppet[:name] are read-onlyJesse Wolfe2010-02-171-6/+18
| | | | | | | | | Historically, the Puppet[:name] setting has been settable, but the results of chaning it are poorly defined. The switch to modes instead of executable names seems like a good time to disable this complexity. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>