summaryrefslogtreecommitdiff
path: root/lib/chef/provider
Commit message (Collapse)AuthorAgeFilesLines
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-1398-98/+98
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Use the correct plist class in the mac user providerTim Smith2020-04-131-2/+2
| | | | | | This is actually a subclass of the mac user provider and not the Plist gem. This is a super confusing name btw. Plist passed Plist, but it's a different Plist. Signed-off-by: Tim Smith <tsmith@chef.io>
* Make sure we're always using the right Plist classTim Smith2020-04-104-7/+7
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Require plist where we use itTim Smith2020-04-102-0/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fixed systemd_unit not respecting sensitive propertysanga172020-04-081-0/+1
| | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
* some spec typosVivek Singh2020-04-071-2/+2
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Revert someVivek Singh2020-04-061-1/+1
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Fix typoVivek Singh2020-04-0611-14/+14
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Convert more resources to unified_modelcg/unified-mode4Lamont Granquist2020-04-015-53/+43
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix comment documenting include_default_source? function.fix-clear-sourcesPete Higgins2020-03-231-5/+5
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Make include_default_source nil by default and change implied logic.Pete Higgins2020-03-231-1/+15
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Clear sources if either a source or rubygems_url is set.Pete Higgins2020-03-231-3/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Add documentation for new magic clear_sources behavior.Pete Higgins2020-03-231-0/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Switch to canonical "https://rubygems.org" URL for rubygems.Pete Higgins2020-03-231-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Change the default value for :rubygems_url to be nil.Pete Higgins2020-03-231-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Move clear_sources? helper from resource to provider.Pete Higgins2020-03-231-1/+9
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Update gem_package to make clear_sources opt-out.Pete Higgins2020-03-231-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* DNF refresh and aarch64-el8 supportlcg/dnf-refreshLamont Granquist2020-03-196-86/+239
| | | | | | | | should port all fixes from the yum provider back into the dnf provider. adds aarch for el8 since the func tests now pass. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9492 from ↵Tim Smith2020-03-181-1/+1
|\ | | | | | | | | MsysTechnologiesllc/sangmesh/Fixed_Use_Ohai_data_to_determine_if_we_have_PowerShell_installed powershell_package: Use ohai data to get the powershell release instead of shelling out
| * Unwanted code removedsanga172020-03-171-1/+1
| | | | | | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
| * Used helper methodsanga172020-03-171-1/+1
| | | | | | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
| * Powershell script code replaced with ohai datasanga172020-03-161-1/+1
| | | | | | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
| * Powershell script replaced with the ohai datasanga172020-03-161-1/+1
| | | | | | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
* | properly remove the providerLamont Granquist2020-03-161-43/+0
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix ruby 2.7 encoding bug and add --always-dump-stacktrace optionLamont Granquist2020-03-111-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9453 from chef/remove_legacy_updatercTim Smith2020-03-091-59/+3
|\ | | | | Remove support in debian service init for old update-rc
| * Remove support in debian service init for old update-rcremove_legacy_updatercTim Smith2020-03-051-59/+3
| | | | | | | | | | | | | | | | | | | | | | This code supports sysv-rc < 2.88 Debian 8 comes with 2.88dsf-59 Debian 7 comes with 2.88dsf-41 So it seems that this code support Debian 6 which went EOL almost exactly 4 years ago. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #9445 from chef/docs_linksTim Smith2020-03-061-1/+1
|\ \ | |/ |/| Update all our links to use the new docs site format / cleanup descriptions
| * Update all our links to use the new docs site formatTim Smith2020-03-041-1/+1
| | | | | | | | | | | | When we migrated to hugo the URLs changed a bit. Nothing ends in .html and we moved all the resources into their own dir. Signed-off-by: Tim Smith <tsmith@chef.io>
* | fixing some windows func test breaksLamont Granquist2020-03-043-5/+5
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9433 from chef/lcg/action-dslTim Smith2020-03-0233-108/+110
|\ | | | | Use the action DSL consistently
| * Use the action DSL consistentlyLamont Granquist2020-03-0233-108/+110
| | | | | | | | | | | | | | | | May be a potentially breaking change if I noodle hard enough on it, it does mean that all the actions are now (correctly) encapsulated in a sub-resource collection, whereas before they never had one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #9422 from chef/remove_msi_checksLamont Granquist2020-03-021-3/+3
|\ \ | | | | | | Deprecate Chef::Platform.supports_msi?
| * | Deprecate Chef::Platform.supports_msi?remove_msi_checksTim Smith2020-02-281-3/+3
| | | | | | | | | | | | | | | | | | This was put in place for Windows Server Nano which didn't support MSIs. That's not a platform anymore so it can go. Here's the original PR: https://github.com/chef/chef/pull/3939 Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Remove the mixin powershell includes from resourcespowershell_includeTim Smith2020-02-282-4/+0
|/ / | | | | | | | | | | | | This is in universal so we don't need to do it in these resources / providers. We had it in some, but not in others. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove support for macOS < 10.12 in the service resourceTim Smith2020-02-281-10/+5
| | | | | | | | | | | | There's no reason to perform this check anymore since we only product packages for macOS 10.13 and later. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove all the code that checks for Windows Nanonano_supportTim Smith2020-02-281-8/+1
|/ | | | | | Windows Nano isn't a thing anymore so we shouldn't spending compute time checking to see if we're on Windows Nano Signed-off-by: Tim Smith <tsmith@chef.io>
* Cookstyle fixes for our resourcesTim Smith2020-02-264-10/+6
| | | | | | | | | | | I ran cookstyle against the resources and fixes a few minor issues: - Remove the now default guard interpreter from a powershell_script - Use our rdoc like header format everywhere - Remove some duplicate copyrights - Simplify a few platform case statements Signed-off-by: Tim Smith <tsmith@chef.io>
* Use the chef-utils helpers in our resourcesTim Smith2020-02-253-4/+4
| | | | | | Use the helpers we now ship to simplify platform detection. Signed-off-by: Tim Smith <tsmith@chef.io>
* convert move resources to unified_modelcg/unified-mode3Lamont Granquist2020-02-253-18/+18
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* unified_mode and custom resource for mdadmLamont Granquist2020-02-251-85/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add assumeyes to dnf helperlcg/dnf-assumeyesLamont Granquist2020-02-241-0/+1
| | | | | | I can't imagine we wouldn't run into needing this Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9387 from chef/lcg/unescapeLamont Granquist2020-02-216-11/+17
|\ | | | | fix ruby 2.7 URI.unescape deprecation
| * add require for CGIlcg/unescapeLamont Granquist2020-02-206-3/+9
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * fix ruby 2.7 URI.unescape deprecationLamont Granquist2020-02-206-8/+8
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Chefstyle fixes identified with Rubocop 0.80Tim Smith2020-02-184-10/+10
|/ | | | | | The new Rubocop detects more unnecessary returns. This fixes these ahead of time so we can roll out the new Rubocop engine without breaking builds later. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #8884 from robuye/debian-update-rcdTim Smith2020-02-101-26/+84
|\ | | | | update syntax of `update-rc.d` commands in enable & disable actions
| * bring back support for legacy update-rc.d syntaxrobuye2019-09-171-13/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Legacy syntax is required to support start & stop priorities on very old systems running SysVinit. If an old enough version is detected Chef will prefer legacy syntax, otherwise it will use modern syntax and the priorities will be for the most part ignored. See https://lists.debian.org/debian-devel/2013/05/msg01109.html for additional context. To use legacy syntax sysv-rc package must be installed and it's version must be < 2.88. If the package is not installed at all then update-rc.d is coming from 'init-system-helpers' package and it's at least 2.88dsf-59.2 so it supports only modern syntax. Note that start|stop syntax has been dropped in 2.88dsf-42 and older 2.88 versions could work, but the email linked above indicates it didn't do anything. Signed-off-by: Rob Ulejczyk <rulejczyk@gmail.com>
| * update syntax of `update-rc.d` commands in enable & disable actionsrobuye2019-09-131-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous implementation was built for an outdated version of `update-rc.d` and it used commands that no longer work. The `stop` and `start` commands were removed in 2.88.dsf-42 [1]: ``` * sysv-rc: - update-rc.d no longer supports non-dependency-based boot. + Remove non-insserv codepaths. + Warn if the start or stop actions are used. + Skip runlevel mismatch warnings if default action is used (no arguments to validate). + Update manual page to remove start and stop actions, plus manual setting of boot sequence ordering; note that start and stop are no longer supported. Closes: #606505. ``` and has been since ported to all currently supported Debian distributions (including Jessie, released in 2015). Both `start` and `stop` commands now effectively call `defaults`. As a result of this `action_disable` did not disable a service, it would enable it instead. Chef would execute the following commands on disable: ``` /usr/sbin/update-rc.d -f <service_name> remove /usr/sbin/update-rc.d -f <service_name> stop 80 2 3 4 5 . ``` But `update-rc.d` would effectively run: ``` /usr/sbin/update-rc.d -f <service_name> remove /usr/sbin/update-rc.d <service_name> defaults ``` And the service gets enabled instead. With changes in this commit Chef will effectively run the following commands: ``` /usr/sbin/update-rc.d -f <service_name> remove /usr/sbin/update-rc.d <service_name> defaults /usr/sbin/update-rc.d <service_name> disable ``` The service is now disabled, as expected. Additionally `priority` support has been dropped entirely from code as it's not supported by `update-rc.d` either. It's potentially a breaking change on a very outdated distributions and it could be worked around with additional `if/else` branches, but given all non-EOLed distros have up-to-date version of `update-rc.d` available it didn't feel worth the complexity. [1] https://launchpad.net/debian/+source/sysvinit/2.88dsf-42 Signed-off-by: Rob Ulejczyk <rulejczyk@gmail.com>
* | Merge pull request #9275 from chilcote/mac_user_fixTim Smith2020-02-031-9/+53
|\ \ | | | | | | mac_user: fixing gid and system properties, and adding hidden property