Showing with 492 additions and 172 deletions.
  1. +4 −0 .github/CONTRIBUTING.md
  2. +1 −0 .gitignore
  3. +1 −1 .msync.yml
  4. +63 −0 .overcommit.yml
  5. +7 −0 .rubocop.yml
  6. +11 −6 .travis.yml
  7. +23 −1 CHANGELOG.md
  8. +8 −8 Gemfile
  9. +4 −4 docs/_index.html
  10. +3 −3 docs/file.README.html
  11. +1 −1 docs/frames.html
  12. +3 −3 docs/index.html
  13. +6 −1 docs/js/app.js
  14. +4 −3 docs/puppet_classes/selinux.html
  15. +12 −7 docs/puppet_classes/selinux_3A_3Aconfig.html
  16. +4 −3 docs/puppet_classes/selinux_3A_3Apackage.html
  17. +7 −12 docs/puppet_classes/selinux_3A_3Aparams.html
  18. +4 −3 docs/puppet_classes/selinux_3A_3Arefpolicy_package.html
  19. +4 −3 docs/puppet_defined_types/selinux_3A_3Aboolean.html
  20. +4 −3 docs/puppet_defined_types/selinux_3A_3Aexec_restorecon.html
  21. +4 −3 docs/puppet_defined_types/selinux_3A_3Afcontext.html
  22. +4 −3 docs/puppet_defined_types/selinux_3A_3Afcontext_3A_3Aequivalence.html
  23. +113 −34 docs/puppet_defined_types/selinux_3A_3Amodule.html
  24. +4 −3 docs/puppet_defined_types/selinux_3A_3Apermissive.html
  25. +4 −3 docs/puppet_defined_types/selinux_3A_3Aport.html
  26. +4 −3 docs/puppet_providers_selinux_fcontext/semanage.html
  27. +4 −3 docs/puppet_providers_selinux_fcontext_equivalence/semanage.html
  28. +4 −3 docs/puppet_providers_selinux_permissive/semanage.html
  29. +4 −3 docs/puppet_providers_selinux_port/semanage.html
  30. +4 −3 docs/puppet_types/selinux_fcontext.html
  31. +4 −3 docs/puppet_types/selinux_fcontext_equivalence.html
  32. +4 −3 docs/puppet_types/selinux_permissive.html
  33. +4 −3 docs/puppet_types/selinux_port.html
  34. +3 −3 docs/top-level-namespace.html
  35. +0 −6 lib/facter/selinux_agent_vardir.rb
  36. +1 −1 lib/facter/selinux_semanage_is_python3.rb
  37. +5 −3 manifests/config.pp
  38. +33 −10 manifests/module.pp
  39. +2 −5 manifests/params.pp
  40. +1 −1 metadata.json
  41. +1 −1 spec/acceptance/nodesets/docker/ubuntu-16.04.yml
  42. +8 −5 spec/acceptance/selinux_permissive_spec.rb
  43. +5 −0 spec/classes/selinux_config_mode_spec.rb
  44. +6 −0 spec/classes/selinux_config_type_spec.rb
  45. +3 −2 spec/classes/selinux_package_spec.rb
  46. +1 −0 spec/classes/selinux_spec.rb
  47. +1 −2 spec/default_module_facts.yml
  48. +3 −0 spec/defines/selinux_boolean_spec.rb
  49. +5 −0 spec/defines/selinux_exec_restorecon_spec.rb
  50. +3 −0 spec/defines/selinux_fcontext_equivalence_spec.rb
  51. +7 −0 spec/defines/selinux_fcontext_spec.rb
  52. +39 −0 spec/defines/selinux_module_spec.rb
  53. +5 −0 spec/defines/selinux_permissive_spec.rb
  54. +8 −1 spec/defines/selinux_port_spec.rb
  55. +4 −0 spec/unit/provider/selinux_port/semanage_spec.rb
  56. +5 −0 spec/unit/puppet/provider/selinux_fcontext/semanage_spec.rb
  57. +5 −0 spec/unit/puppet/provider/selinux_fcontext_equivalence/semanage_spec.rb
  58. +3 −0 spec/unit/puppet/provider/selinux_permissive/semanage_spec.rb
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.

The easiest way to debug in a docker container is to open a shell:

docker exec -it -u root ${container_id_or_name} bash
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.20.1'
modulesync_config_version: '0.21.1'
63 changes: 63 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
#
# Hooks are only enabled if you take action.
#
# To enable the hooks run:
#
# ```
# bundle exec overcommit --install
# # ensure .overcommit.yml does not harm to you and then
# bundle exec overcommit --sign
# ```
#
# (it will manage the .git/hooks directory):
#
# Examples howto skip a test for a commit or push:
#
# ```
# SKIP=RuboCop git commit
# SKIP=PuppetLint git commit
# SKIP=RakeTask git push
# ```
#
# Don't invoke overcommit at all:
#
# ```
# OVERCOMMIT_DISABLE=1 git commit
# ```
#
# Read more about overcommit: https://github.com/brigade/overcommit
#
# To manage this config yourself in your module add
#
# ```
# .overcommit.yml:
# unmanaged: true
# ```
#
# to your modules .sync.yml config
---
PreCommit:
RuboCop:
enabled: true
description: 'Runs rubocop on modified files only'
command: ['bundle', 'exec', 'rubocop']
PuppetLint:
enabled: true
description: 'Runs puppet-lint on modified files only'
command: ['bundle', 'exec', 'puppet-lint']
YamlSyntax:
enabled: true
JsonSyntax:
enabled: true
TrailingWhitespace:
enabled: true

PrePush:
RakeTarget:
enabled: true
description: 'Run rake targets'
targets:
- 'test'
- 'rubocop'
command: [ 'bundle', 'exec', 'rake' ]
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ AllCops:
- .vendor/**/*
- pkg/**/*
- spec/fixtures/**/*
- Gemfile
- Rakefile
- Guardfile
Lint/ConditionPosition:
Enabled: True

Expand Down Expand Up @@ -519,6 +522,10 @@ RSpec/RepeatedDescription:
RSpec/NestedGroups:
Enabled: False

# this is broken on ruby1.9
Style/IndentHeredoc:
Enabled: False

# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
Security/YAMLLoad:
Enabled: false
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ sudo: false
dist: trusty
language: ruby
cache: bundler
bundler_args: --without system_tests development
before_install:
- bundle -v
- rm Gemfile.lock || true
Expand All @@ -17,16 +16,22 @@ matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
- rvm: 2.2.7
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.3
- rvm: 2.3.4
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
branches:
only:
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not impact the functionality of the module.

## [v1.0.0](https://github.com/voxpupuli/puppet-selinux/tree/v1.0.0) (2017-04-01)
## [v1.1.0](https://github.com/voxpupuli/puppet-selinux/tree/v1.1.0) (2017-05-08)
[Full Changelog](https://github.com/voxpupuli/puppet-selinux/compare/v1.0.0...v1.1.0)

**Implemented enhancements:**

- Make use of the stdlib puppet\_vardir fact instead of a custom one [\#217](https://github.com/voxpupuli/puppet-selinux/pull/217) ([oranenj](https://github.com/oranenj))
- Allow specifying module content inline [\#214](https://github.com/voxpupuli/puppet-selinux/pull/214) ([lightoze](https://github.com/lightoze))

**Fixed bugs:**

- config.pp creates tmp as file but selinux\_build\_module\_simple.sh wants to create a dir [\#215](https://github.com/voxpupuli/puppet-selinux/issues/215)

**Closed issues:**

- Expected parameter 'refpolicy\_makefile' of 'Class\[Selinux\]' to have type Stdlib::Absolutepath [\#212](https://github.com/voxpupuli/puppet-selinux/issues/212)

**Merged pull requests:**

- Fedora 26 uses the same package\_name as Fedora 25 [\#218](https://github.com/voxpupuli/puppet-selinux/pull/218) ([logic](https://github.com/logic))
- Ensure the module build tmp/ directory is actually a directory [\#216](https://github.com/voxpupuli/puppet-selinux/pull/216) ([oranenj](https://github.com/oranenj))

## [v1.0.0](https://github.com/voxpupuli/puppet-selinux/tree/v1.0.0) (2017-04-02)
[Full Changelog](https://github.com/voxpupuli/puppet-selinux/compare/v0.8.0...v1.0.0)

**Implemented enhancements:**
Expand Down Expand Up @@ -50,6 +71,7 @@ These should not impact the functionality of the module.

**Merged pull requests:**

- Prepare 1.0.0 [\#211](https://github.com/voxpupuli/puppet-selinux/pull/211) ([oranenj](https://github.com/oranenj))
- Fix resource reference issue when removing fcontexts [\#209](https://github.com/voxpupuli/puppet-selinux/pull/209) ([oranenj](https://github.com/oranenj))
- BREAKING: Remove restorecond management support [\#206](https://github.com/voxpupuli/puppet-selinux/pull/206) ([oranenj](https://github.com/oranenj))
- Doc fixes [\#204](https://github.com/voxpupuli/puppet-selinux/pull/204) ([oranenj](https://github.com/oranenj))
Expand Down
16 changes: 8 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '~> 2.0.1', :require => false
gem 'parallel_tests', :require => false
gem 'puppetlabs_spec_helper', '~> 2.1.1', :require => false
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
Expand All @@ -26,10 +25,10 @@ group :test do
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
gem 'puppet-strings', '~> 1.0.0', :require => false
gem 'puppet-strings', '~> 1.0', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.47.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.10.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop', '~> 0.48.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'mocha', '>= 1.2.1', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
Expand All @@ -39,9 +38,10 @@ group :test do
end

group :development do
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'overcommit', '~> 0.39.1', :require => false
end

group :system_tests do
Expand Down
8 changes: 4 additions & 4 deletions docs/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Documentation by YARD 0.9.8
Documentation by YARD 0.9.9

</title>

Expand Down Expand Up @@ -52,7 +52,7 @@
<div class="clear"></div>
</div>

<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.8</h1>
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.9</h1>
<div id="listing">
<h1 class="alphaindex">Alphabetic Index</h1>

Expand Down Expand Up @@ -262,9 +262,9 @@ <h2>File Listing</h2>
</div>

<div id="footer">
Generated on Sat Apr 1 21:16:40 2017 by
Generated on Fri May 5 19:31:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.8 (ruby-2.3.3).
0.9.9 (ruby-2.3.3).
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/file.README.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
File: README

&mdash; Documentation by YARD 0.9.8
&mdash; Documentation by YARD 0.9.9

</title>

Expand Down Expand Up @@ -276,9 +276,9 @@ <h2>Authors</h2>
</div></div>

<div id="footer">
Generated on Sat Apr 1 21:16:40 2017 by
Generated on Fri May 5 19:31:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.8 (ruby-2.3.3).
0.9.9 (ruby-2.3.3).
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/frames.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>Documentation by YARD 0.9.8</title>
<title>Documentation by YARD 0.9.9</title>
</head>
<script type="text/javascript" charset="utf-8">
var match = unescape(window.location.hash).match(/^#!(.+)/);
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
File: README

&mdash; Documentation by YARD 0.9.8
&mdash; Documentation by YARD 0.9.9

</title>

Expand Down Expand Up @@ -276,9 +276,9 @@ <h2>Authors</h2>
</div></div>

<div id="footer">
Generated on Sat Apr 1 21:16:40 2017 by
Generated on Fri May 5 19:31:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.8 (ruby-2.3.3).
0.9.9 (ruby-2.3.3).
</div>

</div>
Expand Down
7 changes: 6 additions & 1 deletion docs/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ function navExpander() {
}

function mainFocus() {
$('#main')[0].focus();
var hash = window.location.hash;
if (hash !== '' && $(hash)[0]) {
$(hash)[0].scrollIntoView();
}

setTimeout(function() { $('#main').focus(); }, 10);
}

$(document).ready(function() {
Expand Down
7 changes: 4 additions & 3 deletions docs/puppet_classes/selinux.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Puppet Class: selinux

&mdash; Documentation by YARD 0.9.8
&mdash; Documentation by YARD 0.9.9

</title>

Expand Down Expand Up @@ -75,6 +75,7 @@
</dd>
</dl>
</div>

<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
Expand Down Expand Up @@ -457,9 +458,9 @@ <h2>Overview</h2>
</div>

<div id="footer">
Generated on Sat Apr 1 21:16:40 2017 by
Generated on Fri May 5 19:31:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.8 (ruby-2.3.3).
0.9.9 (ruby-2.3.3).
</div>

</div>
Expand Down
19 changes: 12 additions & 7 deletions docs/puppet_classes/selinux_3A_3Aconfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Puppet Class: selinux::config

&mdash; Documentation by YARD 0.9.8
&mdash; Documentation by YARD 0.9.9

</title>

Expand Down Expand Up @@ -70,6 +70,7 @@
</dd>
</dl>
</div>

<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
Expand Down Expand Up @@ -297,7 +298,9 @@ <h2>Config for module building</h2>
132
133
134
135</pre>
135
136
137</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/config.pp', line 30</span>
Expand Down Expand Up @@ -404,9 +407,11 @@ <h2>Config for module building</h2>
force =&gt; true,
}

# created by refpolicy builder and our simple builder
# ensure it does not get purged
file {&quot;${module_build_dir}/tmp&quot;: selinux_ignore_defaults =&gt; true }
# needed by refpolicy builder and our simple builder
file {&quot;${module_build_dir}/tmp&quot;:
ensure =&gt; &#39;directory&#39;,
selinux_ignore_defaults =&gt; true,
}
}</pre>
</td>
</tr>
Expand All @@ -415,9 +420,9 @@ <h2>Config for module building</h2>
</div>

<div id="footer">
Generated on Sat Apr 1 21:16:40 2017 by
Generated on Fri May 5 19:31:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.8 (ruby-2.3.3).
0.9.9 (ruby-2.3.3).
</div>

</div>
Expand Down
Loading