-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(FACT-3163) Add support for OpenBSD #2531
Conversation
Can one of the admins verify this patch? |
ab7f9fe
to
48af4a5
Compare
I think the CI failures are due to a change in behavior with rspec-mocks. We had a similar problem in puppet, so I'll take a look. |
Thanks @buzzdeee I committed a change to fix a test issue with rspec-mocks. Could you fetch the latest changes from https://github.com/puppetlabs/facter#main, rebase your changes on top and force push to your topic branch? |
07d3ec6
to
e0616ac
Compare
thanks @joshcooper give me a bit, and I'll look into the unit tests |
Hi @buzzdeee this is great, thanks so much! Last housekeeping items is to prefix the summary for each commit with
|
yeah, going to squash them, once I'm done with it, I'll let you know when I think I'm good (: |
6208a4e
to
b4302d4
Compare
@joshcooper I think I'm done. All OpenBSD facts have tests, and all but the dhcp resolver. I didn't implement a full Module/Class there, only subclassed Facter::Resolvers::Networking and override the extract_dhcp method. There I don't know how to properly test it, I made a number of different attempts, but all failed in various ways. other changes from initial PR:
the last one I needed because when facter is installed with puppetserver gem install facter, it returned OpenBSD and it just didn't matched it. My final goal is to get puppetserver to run on OpenBSD to replace my dated puppet master based on puppet 5. |
It would be great to get this landed so we can finish up Puppet 7 (and eventually retire 5) on OpenBSD. |
I am currently running Puppetserver 7.9.2 on OpenBSD with this diff in production and it's working fine. |
7dca95e
to
2fa8568
Compare
5dfc61c
to
7bbd55b
Compare
Most inspiration taken from FreeBSD, rest from other OS, and some own creations. Not all core facts supported, but makes puppet facts works well, as well as puppet agent --test Developed/Tested on OpenBSD 7.2, AMD64, Puppet 7.20.0, Ruby 3.1.2 also disable RuboCop Metrics/PerceivedComplexity and Metrics/CyclomaticComplexity as suggested by @joshcooper Additionally: Case insensitive OS detection ran into trouble when facter installed via puppetserver gem install, there the OS returned seems to be OpenBSD instead of all lowercase.
with the file loading change to 4.4, this was quite a hurdle to find. Also wondering why the FACTER queue in Jira is archived? |
Thanks for you work on this @buzzdeee! |
Sorry but this introduced order dependent spec failures and had to be reverted. You can reproduce the failure using:
|
I'm looking |
Hi @joshcooper thanks for the rspec line to reproduce the issue. with a certainty of about 80% I understand what went wrong, and tried to address it in #2642 |
Most inspiration taken from FreeBSD, rest from other OS, and some own creations. Not all core facts supported, but makes puppet facts works well, as well as puppet agent --test
Developed/Tested on OpenBSD 7.2, AMD64, Puppet 7.20.0, Ruby 3.1.2
also disable RuboCop Metrics/PerceivedComplexity
and Metrics/CyclomaticComplexity
as suggested by @joshcooper