summaryrefslogtreecommitdiffstats
path: root/lib/puppet
Commit message (Collapse)AuthorAgeFilesLines
...
* Write ssh_authorized_keys as userMarkus Roberts2010-02-171-29/+9
| | | | | | | | | | | | This is a targeted fix to the issue of permissions when writing ssh authorized key files by 1) requiring that an existing users be specified on the resource and 2) doing the write as that user. It's based on Michael DeHaan's initial implementation of Luke's idea, but with a number of simplifications (mostly by testing necessary conditions as early as possible so the code isn't cluttered up with a lot of checks). The tests in this version are modified slightly to remove some additional implementation couplings that were added in master.
* Fix for #3558 -- source file reading speedupMarkus Roberts2010-02-171-7/+1
| | | | | | It's about 10x faster to read the whole file than to read each line and concatenate them (actually, it's O(n) vs. O(n^2), so the exact speedup depends on the file size).
* Fix for #3556 Plussignment value meldingMarkus Roberts2010-02-171-4/+10
| | | | | | | | | | | | | | The plussignment operator was constructing the new parameter value by modifying the param object's value in place (so as to preserve the file and line information for debugging). However, when multiple resources are overridden by the same plussignment this would result in all of the resources sharing the same value (the union of all the prior values and the new value), which is wrong. Instead, we need to give each resource its own copy of the value (e.g., a copy of the param object), which this patch implements. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixed #3655 - Puppet doesn't find installed packages with portage providerJames Turnbull2010-02-171-2/+2
| | | | Thanks to Benedikt Böhm for the patch
* Fixed #3672 - Error message on duplicate fileserver mounts incorrectJames Turnbull2010-02-171-2/+2
|
* Fixed stored configuration documentationJames Turnbull2010-02-171-3/+3
|
* Fixes #3653 - Changed default factpath value to better reflect plugins in ↵James Turnbull2010-02-171-1/+1
| | | | modules
* Partial fix to #2837 - changed warning message to debugJames Turnbull2010-02-171-1/+1
|
* Fix #3555 - fix state of purged listsPeter Meier2010-02-171-0/+10
| | | | | As purged is not contained by default within ensureable we need to extend the parameter to properly deal with purged lists.
* Fix #3540 - name methods correctlyPeter Meier2010-02-171-2/+2
| | | | | The "Ensure Parameter" tries to call destroy on the provider and not delete.
* Fixes #3295 - generate() now sets the working directory to the directory ↵Paul Lathrop2010-02-171-2/+4
| | | | | | containing the specified command. Also adds rspec tests for generate().
* Fixed #3532 - Typo in lib/puppet/ssl/host.rbJames Turnbull2010-02-171-1/+1
| | | | Thanks to Jasper Lievisse Adriaanse for the fix.
* Fixes #3460 - Makes Puppet FHS compliant by moving /var/puppet to ↵James Turnbull2010-02-172-2/+2
| | | | /var/lib/puppet
* Fix for #3101 (bug in MRI 1.8.7)Markus Roberts2010-02-171-1/+12
| | | | | | | | | | | Due to a bug in Ruby 1.8.7 net/http will attempt to close a connection that wasn't successfully opened (it's nil), first checking to see if the connection is already close, and thus raising a method missing exception. This bug causes error messages that are confusing / misleading. To get around this, we add a closed? method to nil such that a nil (unopened) connection is always considered closed, allowing the real problem to be reported.
* Fixes #3419. OS X 10.6 Ruby doesn't set supplementary groupsNigel Kersten2010-02-171-2/+26
|
* Revert the guts of #2890Markus Roberts2010-02-174-32/+40
| | | | | | | | | | This patch reverts the semantically significant parts of #2890 due to the issues discussed on #3360 (security concerns when used with autosign, inconsistency between REST & XMLRPC semantics) but leaves the semantically neutral changes (code cleanup, added tests) in place. This patch is intended for 0.25.x, but may also be applied as a step in the resolution of #3450 (refactored #2890, add "remove_certs" flag) in Rolwf.
* Fail gracefully on packages that don't have the HOMEPAGE variable set (e.g. ↵Gábor Vészi2010-02-171-1/+1
| | | | dev-lang/php).
* Fixed #3443 - Typo in mount typeJames Turnbull2010-02-171-2/+3
|
* Fixes #3135 - darwin doesn't support 'mount -o remount'James Turnbull2010-02-171-1/+2
| | | | Thanks for Eric Sorenson for the patch.
* Adding :catalog_terminus settingLuke Kanies2010-02-174-6/+15
| | | | | | | | | | This will rarely be used, but it enables even more architectural flexibility, such as precompiling catalogs and storing them in memcached or equivalent. With this setup, a single host can probably serve all catalogs and you would then just have as many compiling hosts as needed. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* fixing obsolete comment in puppetdLuke Kanies2010-02-171-3/+3
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding support for only using cached catalogsLuke Kanies2010-02-172-1/+5
| | | | | | | | | This basically allows a sysadmin to control when a client will compile a new catalog - with this option enabled, the client will use the cached catalog as long as it has one, only recompiling when run with the option disabled. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Refactoring Configurer to enable the next featureLuke Kanies2010-02-171-27/+30
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fix #3155 - prevent error when using two matching regex in cascadeBrice Figureau2010-02-174-12/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following manifest: case $var { /match/: { if $var =~ /matchagain/ { } } } is failing because the "=~" operators when matching sets an ephemeral variable in the scope. But the case regex also did it, and since they both belong to the same scope, and Puppet variables are immutables, the scope raises an error. This patch fixes this issue by adding to the current scope a stack of ephemeral symbol tables. Each new match operator or case/selector with regex adds a new scope. When we get out of the case/if/selector structure the scope is reset to the ephemeral level we were when entering it. This way the following manifest produces the correct output: case $var { /match(rematch)/: { notice("1. \$0 = $0, \$1 = $1") if $var =~ /matchagain/ { notice("2. \$0 = $0, \$1 = $1") } notice("3. \$0 = $0, \$1 = $1") } } notice("4. \$0 = $0") And the output is: 1. $0 = match, $1 = rematch 2. $0 = matchagain, $1 = rematch 3. $0 = match, $1 = rematch 4. $0 = Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixed link typoJames Turnbull2010-04-221-1/+1
|
* Fixed #3384 - Updated broken linkJames Turnbull2010-04-221-3/+3
|
* Making a Puppet::Module test more resilientLuke Kanies2010-04-131-3/+3
| | | | | | It would fail if a directory unexpectedly existed. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing yumrepo type to use 'flush'Luke Kanies2010-04-121-25/+1
| | | | | | | | It was previously relying on monkey-patching the last 'Change' instance in 'evaluate', but we removed 'evaluate', so this wasn't working any more. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Only trying to retrieve passwords on OS X when rootLuke Kanies2010-04-121-2/+2
| | | | | | | We were otherwise failing whenever we tried to read a user. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing a warning in the aix package providerLuke Kanies2010-04-121-1/+1
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Removing tests for code that was removed in the REST refactorLuke Kanies2010-04-121-38/+0
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing and porting Transaction Report testsLuke Kanies2010-04-121-3/+3
| | | | | | | There are still a few unported tests, but it's at least better now. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing Property#change_to_s in rare case failuresLuke Kanies2010-04-121-3/+3
| | | | | | | | | If we were removing a field, which really only 'cron' does, then we got an exception. This is fixed, and now tested. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing Hash functionality with non-constant keysLuke Kanies2010-04-121-1/+2
| | | | | | | It was only apparently working with constant keys, not, say, AST strings. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Removing vistigial method in ASTHashLuke Kanies2010-04-121-3/+0
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Porting/removing group test/unit testsLuke Kanies2010-04-121-5/+0
| | | | | | | Most of it was just complicated, and the rest useless. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Cleaning up content/source codeLuke Kanies2010-04-122-15/+11
| | | | | | | | | | This is probably a slight refactor, but only because it fixed a bug (content not being copied over correctly from metadata), which required that slight refactor. Mostly this just makes the code a bit cleaner. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Making SshAuthorizedKeys tests less brittleLuke Kanies2010-04-121-1/+1
| | | | | | | Also making them less likely to try to modify the local filesystem in any way. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Markus's patch concerning string interpolationJesse Wolfe2010-04-123-1674/+1759
| | | | | | | | | | | From email: Some of the errors I needed to track down were actually coming from my string interpolation branch: * I wasn't handling "Foo ${1} bar" as a regexp back reference (and I don't like it, but hey) * I wasn't warning about & passing on the "unneeded" backslash in strings like 'foo\"bar' * I fumbled part of the conflict resolution with Brice's hash patch.
* The pure-ruby YAML lib doesn't accept parametersJesse Wolfe2010-04-091-1/+1
|
* Fix a failure in new FileBucket where it was impossible to read from aJesse Wolfe2010-04-093-4/+6
| | | | | | bucket with a non-default path. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fixing various broken Resource::Type testsLuke Kanies2010-04-091-2/+7
| | | | | | Also making the code a bit cleaner. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Renaming and fixing puppetrun tests.Luke Kanies2010-04-091-1/+4
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Removing any mentions of :casesensitive settingLuke Kanies2010-04-094-13/+7
| | | | | | | | | | | | | | | | | It is a setting that was added years ago as a backward compatibility option and even if it still works, which is questionable, it has no purpose any longer. It just complicated the code and didn't do much, so it's gone now. Also simplified the interface of Leaf#evaluate_match, since it was now using none of the passed-in options. Finally, removed/migrated the last of the Selector/CaseStatement test/unit tests. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing syntax warningLuke Kanies2010-04-091-1/+1
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Repair validate_checksum codepath, even though it is disabled.Jesse Wolfe2010-04-091-1/+5
|
* Resolving conflicts with ???Markus Roberts2010-02-171-5/+5
| | | | | | | | | When checksum is a parameter corresponding to checksum_type in the filesets rather than a checksum "strategy" the value :none should generally be computed rather than provided. If neither a source nor contents are provided, there is no need for a checksum and thus it should be :none; otherwise, use the provided value (or, if it's nil, let it pass through and be replaced by the default (:md5) in the bowels of the beast).
* Fixing a typo from a regexLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing change printing for content/ensureLuke Kanies2010-02-172-4/+9
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Converted File[checksum] to a parameter not propertyLuke Kanies2010-02-174-273/+29
| | | | | | | | | At the same time I removed all of the code in checksum that managed tracking changes to the checksum over time. I'll add it back in as I fix the fact that changes aren't being tracked like the should at the moment. Signed-off-by: Luke Kanies <luke@reductivelabs.com>