diff options
author | Eric Wong <e@80x24.org> | 2023-10-06 09:46:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-06 21:06:54 +0000 |
commit | 4c4466e455fd6940700125f8c21b326564915913 (patch) | |
tree | 5f6f5a05c8ec8d41074da74bdc566926a89c86b6 /install/os.perl | |
parent | aef38b546fd15f161dc0f0c2c9ec9b7b7798672a (diff) | |
download | public-inbox-4c4466e455fd6940700125f8c21b326564915913.tar.gz |
require_bsd and require_mods(':fcntl_lock') are now supported in TestCommon to make it easier to maintain than a big list of regexps. getsockopt for SO_ACCEPTFILTER seems to always succeed, even if the retrieved struct is all zeroes.
Diffstat (limited to 'install/os.perl')
-rw-r--r-- | install/os.perl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/install/os.perl b/install/os.perl index 4fcbcbe4..bf5c55c2 100644 --- a/install/os.perl +++ b/install/os.perl @@ -40,7 +40,7 @@ EOM last if $ID ne '' && $VERSION_ID ne ''; } $ID = 'linux' if $ID eq ''; # cf. os-release(5) -} elsif ($^O =~ m!\A(?:free|net|open)bsd\z!) { # TODO: net? dragonfly? +} elsif ($^O =~ m!\A(?:free|net|open)bsd\z! || $^O eq 'dragonfly') { $ID = $^O; require POSIX; (undef, undef, $release, $version) = POSIX::uname(); @@ -50,7 +50,8 @@ EOM die "$^O unsupported"; } $VERSION_ID //= 0; # numeric? could be 'sid', actually... -my %MIN_VER = (freebsd => v11, openbsd => v7.3, netbsd => v9.3); +my %MIN_VER = (freebsd => v11, openbsd => v7.3, netbsd => v9.3, + dragonfly => v6.4); if (defined(my $min_ver = $MIN_VER{$^O})) { my $vid = $VERSION_ID; @@ -63,7 +64,7 @@ EOM } sub pkg_fmt () { - if ($ID eq 'freebsd') { 'pkg' } + if ($ID =~ /\A(?:freebsd|dragonfly)\z/) { 'pkg' } # *shrug*, as long as the (Net|Open)BSD names don't conflict w/ FreeBSD elsif ($ID eq 'netbsd') { 'pkgin' } elsif ($ID eq 'openbsd') { 'pkg_add' } |