sous-chefs / selinux

Development repository for the selinux cookbook
https://supermarket.chef.io/cookbooks/selinux
Apache License 2.0
58 stars 70 forks source link

[issue #119] Update fcontext to allow override of built-in types #120

Closed ywei2017 closed 2 months ago

ywei2017 commented 4 months ago

Description

Allow override of of the fcontext of system built-in file specs.

Issues Resolved

Issue #119

Check List

ywei2017 commented 4 months ago

See testing, for 3 of the instances, I am having issue with the driver. All others tested fine.

Stromweld commented 4 months ago

Can you rebase or merge remote main into your current branch and then fix any failing tests. I just merged new test versions.

ywei2017 commented 4 months ago

Will do

On Fri, May 3, 2024 at 1:56 PM Corey Hemminger @.***> wrote:

Can you rebase or merge remote main into your current branch and then fix any failing tests. I just merged new test versions.

— Reply to this email directly, view it on GitHub https://github.com/sous-chefs/selinux/pull/120#issuecomment-2093595737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJK3CILXVICL2DJLC7BZATZAPMXDAVCNFSM6AAAAABGVZRYA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGU4TKNZTG4 . You are receiving this because you authored the thread.Message ID: @.***>

ywei2017 commented 4 months ago

@Stromweld - Completed the testing. I had issues earlier which turned out to be the version of Chef Workstation I was using. I also had to make wait_for_retry longer as the description said, for some of the test cases.

Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-almalinux-8> (0m9.87s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-centos-7> (0m9.57s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-centos-stream-8> (0m10.18s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 13 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-debian-10> (0m7.61s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 13 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-debian-11> (0m7.48s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-fedora-latest> (0m9.35s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-oracle-7> (0m9.40s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-oracle-8> (0m10.29s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-rockylinux-8> (0m9.69s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 13 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-ubuntu-1804> (0m7.29s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 13 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-ubuntu-2204> (0m8.58s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 14 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-amazonlinux-2> (0m9.59s).
--
Profile Summary: 3 successful controls, 0 control failures, 0 controls skipped
Test Summary: 13 successful, 0 failures, 0 skipped
       Finished verifying <fcontext-ubuntu-2004> (0m8.42s).
ywei2017 commented 3 months ago

@Stromweld - Any further actions on my side for the PR? Thanks.

ywei2017 commented 3 months ago

@Stromweld Anything I need to do before the PR can be merged? Thanks.

Stromweld commented 3 months ago

Sorry for taking so long to get back to you. 1 last thing would be to update the .github/workflows/ci.yml to be similar to this one https://github.com/sous-chefs/php/blob/main/.github/workflows/ci.yml to fix the pipeline tests.

ywei2017 commented 3 months ago

@Stromweld - Do you have an example to pass the integration testing?

ywei2017 commented 2 months ago

@Stromweld - Do you have an example to pass the integration testing?

  • I don't think the "doken" driver would work, since enabling SELinux requires a reboot, and containers don't survive reboot. I tried both locally and on github, that keeps on failing.
  • Or I can try the "vagrant" driver, but don't know a VM type to use that has Vagrant and virtualbox installed. Thanks

@Stromweld Can I get some help here? Sorry to bug you, I am looking for a working example to follow. Thanks.

Stromweld commented 2 months ago

yeah it looks like you are correct on the dokken images. Github Actions runners for macos used to come with vagrant and virtualbox and docker preinstalled. They don't anymore so it's best to switch it to ubuntu-latest like we did and add a step to install vagrant and virtualbox latest versions like here https://github.com/chef/bento/blob/main/.github/workflows/pkr-bld-virtualbox-x64.yml#L38-L45.

kitchen-porter commented 2 months ago

Released as: 6.2.0

ywei2017 commented 1 month ago

I will find some time and try it out. Thanks

On Mon, Jul 15, 2024 at 11:31 AM Corey Hemminger @.***> wrote:

yeah it looks like you are correct on the dokken images. Github Actions runners for macos used to come with vagrant and virtualbox and docker preinstalled. They don't anymore so it's best to switch it to ubuntu-latest like we did and add a step to install vagrant and virtualbox latest versions like here https://github.com/chef/bento/blob/main/.github/workflows/pkr-bld-virtualbox-x64.yml#L38-L45 .

— Reply to this email directly, view it on GitHub https://github.com/sous-chefs/selinux/pull/120#issuecomment-2228917904, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJK3CNKIX24BV3ABIY4O3LZMP2M5AVCNFSM6AAAAABGVZRYA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRYHEYTOOJQGQ . You are receiving this because you authored the thread.Message ID: @.***>