This repository has been archived by the owner on Jun 19, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add os.release facts on FreeBSD #485
Add os.release facts on FreeBSD #485
Changes from 1 commit
5723eec
ca9c35e
6d0bdff
cd588c4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.strip will raise NoMethodError if output is empty string or if freebsd_version_results[0/1/2] is nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
freebsd-version -kru
is expected to return exactly 3 lines (each flag produce a line), so I do not thing this is a problem for us here. Yet, some FreeBSD forks might be detected as "FreeBSD" while not providingfreebsd-update
, so it's worth being sure that the command succeeded.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HardenedBSD doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igalic did you have the opportunity to try it on HardenedBSD? I need to allocate some time to dig in this project…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately, my current priority
canonical/cloud-init#363 is a few yak stacks away from testing HardenedBSD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FreeBSD is definitively a descendant of BSD, yet BSD is not a decedent of Solaris (amusingly, early version of Sun OS (which became Solaris at some point) was based on BSD).
For now, this is convenient because Solaris facts and resolvers provide ZFS related facts which are working on FreeBSD, however, ZFS on Linux is a thing and some refactoring will be necessary at some point. Don't know how / where to log this so that it can be tracked…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe it is as simple as renaming the Solaris ZFS resolver to make it obvious it is not Solaris specific and use similar facts for FreeBSD, Solaris and maybe Linux to gather these facts… So basically the same code facts multiple times, but maybe it's not a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smortex I talked with @oanatmaria and maybe we can have something like
Both
Solaris
andBsd
will inherit fromUnix
. This is based on the diagram from https://upload.wikimedia.org/wikipedia/commons/7/77/Unix_history-simple.svg