58 Commits

Author SHA1 Message Date
Ben Roberts
75751b60b3 Improve parsing of portage package versions 2019-12-08 18:20:27 +00:00
4a3dcd0a8a Rubocop fixes 2019-05-10 22:17:45 +01:00
939f795d37 Autocorrect PDK validation warnings 2019-05-09 23:41:09 +01:00
882df7423d Handle packages with pre_pre version strings 2018-10-14 11:54:13 +01:00
c830b8ebd0 Add missing ends 2018-10-14 11:38:29 +01:00
1c7804128c Pass on only the exception message for puppet 6 compatibility 2018-10-14 11:34:51 +01:00
Alexander "Ace" Olofsson
0bc87f0cbf Replace custom fact with executable fact
Should solve #4
2017-03-12 23:46:36 +01:00
Alexander "Ace" Olofsson
c46c360eb0 Update operatingsystem.rb
Use additional confines instead of checks in setcode to detect the distribution ID
2016-10-31 09:31:41 +01:00
97c1cc97e6 Add entropy_repos fact 2016-10-16 13:42:47 +01:00
bd1fd54bbb Handle unexpected boolean type conversion 2016-10-16 13:35:09 +01:00
3a4c1c85ad Add entropy_repo type/provider, with tests and docs 2016-10-16 00:40:35 +01:00
53bbad2eb1 Fix entropy providers use of equo with locale
Previous attempt didn't work properly. This version uses the proper
`provider.has_command` api to specify the env vars which should be used.

Also catches the exit 1 thrown when `equo match --installed` doesn't
find anything, now that the wrapper script is no longer hiding the exit
code behind an explicit `exit 0`.
2016-10-13 22:08:04 +01:00
4020627a15 Remove obsolete has_entropy fact 2016-10-13 18:55:24 +01:00
a265caa979 Update entropy package provider to use locale without shelling out 2016-10-13 18:55:07 +01:00
7ce45a207f Add a locale fact which uses eselect locale to retrieve system default 2016-10-13 18:54:28 +01:00
5e5d056025 Remove required attribute validation
Previously, the entropy types would require that either package, tag, or repo
were provided, since that makes sense for the entropy files. Having a resource
that could not provide any of these would leave a malformed entry in the files.

I've had to remove that due to a deficiency in Puppet that's taken a long time
to track down. While the validation works fine for resources specified in
manifests, it breaks when parsing the records back in. Here's why:

- The provider instances method is called to retrieve a list of all entries
  in the entropy files. This correctly parses the name and properties into the
  provider instance object
- Puppet's type.rb enumerates through each of these, and tries to create a new
  Type insance using just the name and provider parameters from the provider
  instance. It then intends to iterate through the properties and add them one
  at a time.
  0c2157974a/lib/puppet/type.rb (L1180)
- The problem is that the top-level validation function is called when the
  object is first created, and at this time, none of the properties have been
  set, so the required properties have not been set and validation fails.

The top-level validation block cannot mandate a property be set, only other
types of condition.
2016-10-13 16:52:29 +01:00
0e774c77d5 Improve category/package regex, validation and add spec tests 2016-10-13 16:51:22 +01:00
7f069307ee Handle keywords entries with just a repo and no package 2016-10-13 00:48:07 +01:00
61b3262b7a Use native to_line methods which is more easily testable 2016-10-12 23:11:11 +01:00
6a832304e3 Fix bug with splitdebug_mask provider fulfiling the wrong type 2016-10-12 13:18:32 +01:00
e5b253546a Add required parameter and version validation to all package types 2016-10-12 11:51:22 +01:00
6e5f65befc Add additional validation for entropy_mask parameters
Goes part way towards fixing #1
2016-10-11 23:58:33 +01:00
5a658c5d7e Update allowed characters for slots, tags and repo names 2016-10-11 23:58:33 +01:00
1072760d2b Add support for entropy_keywords type 2016-10-11 23:58:33 +01:00
c2ee8a6ca5 Entropy wants ## for inline comments 2016-10-11 23:58:33 +01:00
614e836827 Add support and docs for entropy_splitdebug_mask 2016-10-11 19:53:48 +01:00
8ca58a6323 Add splitdebug type/provider 2016-10-11 18:53:44 +01:00
d7b0532677 Add entropy_unmask provider, based on the entropy_mask one 2016-10-10 21:43:54 +01:00
11aa4bcb50 Minor fixups to entropy_mask provider 2016-10-10 21:43:30 +01:00
0da0175b3f Simplify the default for the sabayon systemd service handler 2016-10-10 21:14:45 +01:00
91e159fe6f Override the operatingsystem fact definition for sabayon 2016-10-10 21:14:27 +01:00
86e6bece99 Add a native type/provider to manage entropy package masks 2016-10-10 19:22:16 +01:00
294cedb18e Tidy up unused code, fix description in enman_repo 2016-10-10 19:17:48 +01:00
e2a40f8012 Add autorequires for enman_repo on package[enman] 2016-10-09 13:47:43 +01:00
7b5f189acf Add a type/provider to handle enman repos 2016-10-08 20:22:10 +01:00
11c2b54be2 Update package provider to also check for non-repository installed packages 2016-09-30 19:13:19 +01:00
2d9f7eafe5 Handle the different module path when using puppet-agent 2016-04-30 20:01:13 +01:00
2c1d8c9d88 Remove facts that no longer work with puppetserver 2015-07-28 00:45:40 +01:00
7768afd23f Add additional constraints to ensure entropy is taken as the default provider 2014-11-25 21:33:17 +00:00
3a1e09db88 Update regex to handle versions like 20140101a when matching installed packages 2014-11-23 23:49:10 +00:00
f371e97b6b Include the necessary libraries to properly determine the running OS 2014-08-11 22:49:16 +01:00
3ef20e37ce Add an osfamily fact to define Sabayon as a Gentoo derivative 2014-08-11 22:48:35 +01:00
6524e3258c Update providers for sabayon 2014-08-10 10:41:53 +01:00
6dd8ff3a2f Update operatingsystem fact to support Sabayon the official way 2014-07-27 17:12:23 +01:00
ce1ae3f96f Use has_entropy instead of operatingsystem to confine/set default package provider 2014-07-24 22:10:36 +01:00
7e78985fdb Dont rely on eselect to determine active init system 2014-04-14 22:27:08 +01:00
b9123773d1 Detect which sysvinit is enabled for sabayon hosts 2013-10-13 19:00:35 +01:00
f87828f72c Remove unncessary require statement for later ruby/puppet versions 2012-12-23 19:19:14 +00:00
1f82d423b8 Fix package provider following incompatible changes to entropy 2012-12-23 19:18:43 +00:00
0a83e64917 Fix locale for calls to equo 2012-06-17 00:29:59 +01:00