Giter VIP home page Giter VIP logo

Comments (7)

BackSlasher avatar BackSlasher commented on August 17, 2024

Hi. I don't think I support this kind of use case - installing a compiled module.
You can revert to the source files and use this resource, add the required functionality (we can think about what goes where together), or avoid using this resource and opt for an execute resource for installing your pe file.
LMK what you think

from selinux_policy.

BackSlasher avatar BackSlasher commented on August 17, 2024

Aha.
Use directory and populate that directory using cookbook_file
If you think the documentation could explain it better, please LMK

from selinux_policy.

xenlo avatar xenlo commented on August 17, 2024

Yes! using directory populated up front with a remote_directory is working.

### Populate a remote working directory
remote_directory '/tmp/selinux-qas' do
  source 'selinux-qas'
  owner 'root'
  group 'root'
  mode '0755'
  action :create
end

### Install the SELinux policies
if node['platform'] == 'redhat'
  include_recipe 'selinux_policy::default'
  selinux_policy_module 'sshdqas' do
    directory '/tmp/selinux-qas'
    action  :install
  end
end

Do you estimate it as an right way of working? If yes, I propose that a small note could be added in the doc to the directory attribute, and maybe add an extra example usage.

Anyway, I try to improve a bit my recipes by using .te files in place of .pp. Even I don't plan to edit those, it is still better to have the .te files versioned in Git.

Thanks

from selinux_policy.

xenlo avatar xenlo commented on August 17, 2024

Voila, pull request on README.md done as draft for de doc change

from selinux_policy.

BackSlasher avatar BackSlasher commented on August 17, 2024

I personally dislike putting "compiled" stuff in my cookbook.
I support either:

  • keeping the source in the cookbook and compiling it on the machine
  • keeping the compiled result in an artifact store of some kind and pulling it from there

The first works with directory_source, the second with directory and something that puts files in that directory.

This is of course only my thought about doing stuff, and isn't necessarily the best way for everyone.

Happy to hear everything works. Will review your README modification

from selinux_policy.

BackSlasher avatar BackSlasher commented on August 17, 2024

+1 for your comment about keeping the .te. It's just a better idea to keep the source, in case you DO want to modify something, rather than having "this is the binary can't regnerate it"

from selinux_policy.

lock avatar lock commented on August 17, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from selinux_policy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.