Age | Commit message (Collapse) | Author | Files | Lines |
|
- Move Windows ADSI code out of puppet/util and into
puppet/util/windows
- Update namespace from Puppet::Util::ADSI to
Puppet::Util::Windows::ADSI
- Add module / class definitions for ADSI to util/windows.rb
to prevent tests from blowing up on non-Windows
- Moving Puppet.features.microsoft_windows? checks to top of
user and group provider tests for ADSI
- Update all dependent code, remove unnecessary references
|
|
* upstream/stable:
(PUP-2182) Fix yum and zypper providers virtual_package feature.
|
|
The yum and zypper package providers were installing virtual packages even when
allow_virtual was default or set to false.
For yum, the fix is to do a "yum list" command before doing an installation whenever
allow_virtual is not true. The list command will fail on virtual
package names. This will prevent the package from being installed as
expected and is only performed if a version is not ensured, since
virtual packages cannot be installed by version.
For zypper, the fix is to pass the --name option to zypper if not
allowing virtual packages and a version string was not ensured.
|
|
In 3.5.x, the yum package provider changed to accept virtual package
names (packages that provide other package names).
That change in behavior caused some undesirable side-effects. As we did
not give users fair warning that this behavior was changing, we have
decided to change the yum provider back to only accepting "real" package
names by default.
To keep the support for virtual package names, a "virtual_packages"
feature has been implemented on the package type and supported on the
yum package provider. The feature adds the "allow_virtual" parameter
that controls whether or not virtual package names will be allowed for
install/uninstall.
For now, the default value for this parameter will be false to restore
the previous behavior. However, a deprecation warning will be issued to
let users know that the default will eventually be changed to true.
Users can prevent the deprecation warning by explicitly setting the
parameter to either true or false.
|
|
(PUP-2182) Add virtual_packages feature to package type.
|
|
(PUP-2311) OpenBSD uninstall broken when multiple uninstall_options give
|
|
In 3.5.x, the yum package provider changed to accept virtual package
names (packages that provide other package names).
That change in behavior caused some undesirable side-effects. As we did
not give users fair warning that this behavior was changing, we have
decided to change the yum provider back to only accepting "real" package
names by default.
To keep the support for virtual package names, a "virtual_packages"
feature has been implemented on the package type and supported on the
yum package provider. The feature adds the "allow_virtual" parameter
that controls whether or not virtual package names will be allowed for
install/uninstall.
For now, the default value for this parameter will be false to restore
the previous behavior. However, a deprecation warning will be issued to
let users know that the default will eventually be changed to true.
Users can prevent the deprecation warning by explicitly setting the
parameter to either true or false.
|
|
|
|
|
|
|
|
Currently the gem provider will match gemname$, for example with bundler
this will return quite a long list of anything ending with bundler. When
a match returns a longer list, it will actually connect and try to pull
the latest gem again, thus increasing the WAN usage and rubygems.org
usage when not necessary.
The proposed fix adds a ^ in front of the name var to ensure it begins
with the gemname.
|
|
adrienthebo/issue/master/pup-1060-yum-package-enablerepo
PUP-1060 respect enablerepo and disablerepo when ensuring latest on yum packages
|
|
|
|
The initial fix for pup-1932 inadvertently included 'static' services,
which are services which can't be enabled/disabled. Since such services
aren't manageable, it doesn't make sense to include them in instances,
so this commit removes them.
|
|
When a package resource is ensured => latest, the specific version
available will depend on what yum repositories are enabled and disabled.
Commit a4abf13d3 added the ability to pass arbitrary options to install
and update commands which allowed users to specify the --enablerepo and
--disablerepo options, but these flags would not be respected when the
latest package version was used. This meant that the latest version
found and the version that could be installed with the --enablerepo and
--disablerepo flags might differ, causing all sorts of bad things to
happen.
This commit resolves this issue by making the version query aware of
these flags. When a package checks for the latest version available, it
passes all repositories enabled and disabled to the update query.
Whenever an update query is made for the first time with a combination
of repositories that output is stored, so that only query for a given
combination of repositories is made.
Unfortunately, this change still relies on yumhelper to do the actual
querying. In the long run it would be good to use `yum check-update`
instead of the complex helper script so that we can actually test and
verify the code responsible for querying packages.
|
|
In the previous implementation of yum .prefetch, package providers were
loaded and then the yumhelper.py script was used to determine the latest
versions available for all installed packages. While this worked for
simple cases, trying to support multiple combinations of enablerepo and
disablerepo flags makes this grossly more complex. In addition this
information is not needed at prefetch time, and testing the behavior in
prefetch gets messy.
This commit extracts the latest version query from the prefetch method.
It moves the logic to a method that does the actual querying and lazily
loads that data to keep the same run speeds. When multiple combinations
of enablerepo and disablerepo are added this information can be loaded
in the same fashion.
|
|
|
|
Before now, Puppet has been unable to enable services on OpenBSD.
This work implements a flags property that is manages the content of the
rc.conf.local file, used by OpenBSD to define service runtime options
and enable services.
The flags property may also be used by other platforms, such as FreeBSD.
|
|
kylog/issue/pup-1932/systemd-reports-transient-services
(PUP-1932) Restrict systemd provider to manage file-based services
|
|
|
|
|
|
* stable:
(packaging) Update PUPPETVERSION to 3.5.1-rc1
(maint) Raise error when parsing duplicate INI section
(maint) Yumrepo boolean values are case insensitive.
(PUP-2178) Map INI name to yumrepo descr
(PUP-2181) Delete ini file entries on absent property
(PUP-2179) Replace Puppet::Util::IniConfig::File
(PUP-2179) Implement simple INI file collection
(PUP-2179) implement storing for single INI files
(PUP-2179) Implement INI single file formatting
(PUP-2179) Extract standalone INI file class
(PUP-2179) Add test coverage for IniConfig::Section
(maint) Don't strip whitespace from yumrepo keys
(PUP-2162) support yumrepo baseurl/gpgkey multiple values
(PUP-2150) allow yumrepo params to be set absent
(PUP-2613) Comprehensively test all yumrepo params
|
|
The yumrepo type uses 'name' as the namevar, while yum configuration
uses 'name' as the repository description. Because of this mismatch the
yumrepo type has a descr field that we need to explicitly map to the
'name' INI property. This commit adds the necessary mapping of that
field.
|
|
|
|
Moving the implementation of join_options into the base package provider.
This gives a consistent behavior between all package providers that support install_options.
|
|
Fixing the apt package provider spec so that the resource isn't entirely
mocked and returning 'asdf' for every property. Modeling the spec after
the yum package provider spec to accomplish that.
Adding install_option example that tests for hash.
|
|
Fix apt package provider install options to support hash in addition to
arrays and strings. This makes it consistent with other package
providers.
Add spec examples to test install options.
|
|
|
|
|
|
* upstream/stable:
(PUP-1937) Revert changes to with_version
(PUP-2039) Fix rpm package provider usage of --whatprovides.
|
|
(PUP-1587) crontab: make sure that invalid crontabs aren't written out
(PUP-1586) remove obsolete unit test
(PUP-1586) allow managing existing cronjobs without caring for command
Signed-off-by: Charlie Sharpsteen <Charlie Sharpsteen chuck@puppetlabs.com>
|
|
(PUP-2033) Use loglevel for diff output
|
|
The fix for PUP-897 (commit ecb761e24a) introduced always passing
--whatprovides to rpm when querying for packages. This breaks querying
for packages that have architectures specified, e.g.
'vim-enhanced.x86_64'.
The proper way to do this is to first query without --whatprovides and
see if rpm finds a package by the given name. If rpm fails to find a
package, fallback to using --whatprovides to support querying for
virtual package names.
|
|
Previously puppet would fail when trying to list all services because some
services require parameters for status queries to succeed. These include
idmapd-mounting and startpar-bridge. This commit adds those services to the
exclude list so that they are ignored when querying upstart for their status.
|
|
This brings the same changes made to the file type for PUP-1846 to the
augeas provider's diffing logic. If a loglevel is specified on the
resource then the diff will be logged at that level. If it is left off,
then the diff will be logged at the notice level.
|
|
The previous tests didn't actually make sure that the diff was logged.
This adds that coverage as well as checking that the log is at the
correct level.
|
|
The spec had an example which was expecting a nil
install_options by checking the 6th element in an array.
With the change to not append the install_options
unless specified, the example was passing but the
functionality no longer matched the example.
Changing the example to ensure 5 elements were
passed to execute instead of the previous 6.
|
|
* upstream/stable:
(PUP-2017) Change TupleType size to mean total number of entries
(PUP-1944) Fix issue with manifest being a directory when initializing
(PUP-1210) Provide clear guidance on OSX passwords
(PUP-1210) Error if missing password info on OSX 10.8
|
|
When managing passwords on OSX versions >= 10.8 the password needs to
hashed using PBKDF2. PBKDF2 uses a salt and a number of iterations,
which the puppet user type supports (specifically for this), and are
critical parts of the password storage. Many users seem to have been
tripped up by this change (since no other systems that are managed do
this, including older versions of OSX) and created user accounts that
were unable to be logged into.
This causes the provider to fail on >= 10.8 if any one or two of the
salt, iterations, or password are missing. This should provide better
guidance and error messages for users in this situation.
|
|
The previous commit used remove_instance_variable for fixing a spec
ordering issue. This method is private on 1.8.7.
The fix is to instead just set the variable to nil, as it has the same
effect in this case.
|
|
The directoryservice provider caches some information such as OS version
and groups. If a spec runs before the directoryservice spec that causes
information to be cached, expected stubs in the directoryservice spec
will not be invoked.
The fix is to remove the instance variables that are caching the
information on the examples that are expecting that nothing is already
cached.
|
|
* pr/2429:
(PUP-620) Add spec examples for yum install_options.
(PUP-620) Limit gem install_options to install only.
(PUP-620) Add install_options to gem provider
This closes GH-2429.
|
|
Checks nil install_options.
Checks plain values and hash key-pairs.
|
|
(PUP-748) Fix the zypper package provider support for install_options.
|
|
(PUP-1751) Fix service provider on Suse to handle boot services.
|
|
* pr/2414:
(PUP-1769) Don't pass nil through to provider command
(Maint) Convert test to use real resource objects
(PUP-1769) Update yum specs with install_options
(PUP-1769) Use join_options command
(PUP-1769) Changing the has_feature to a one-liner
(PUP-1769) yum provider takes install_options
Closes GH-2414
|
|
Previously, if `install_options` was not specified, then we would
pass a nil value through to the `yum` command. While this would work, we
don't document that nil's are acceptable arguments.
This commit ensures we only pass in non-nil `install_options`.
|
|
Use real yum package resource objects
|
|
Specs now take into consideration the install_options parameter, with
both singletons and key-value pairs.
|
|
Prior to this commit, the systemd provider returned in-memory services.
This had a couple odd consequences, e.g. with 'puppet resource service':
1) short-lived services would come and go, though they are not actually
managed directly
2) disabled and stopped services wouldn't be reported at all
This commit changes the systemd provider to return file-backed
services.
|