Skip to content

Commit 6622b4e

Browse files
committed
feat: Finish vmactions to add omnios, freebsd, and dragonfly bsd CI support
2 parents 6c71e07 + 365a119 commit 6622b4e

File tree

5 files changed

+162
-4
lines changed

5 files changed

+162
-4
lines changed

.github/workflows/vmactions.yml

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: VMActions CI for meson build
3+
4+
on: [push]
5+
6+
jobs:
7+
omnios:
8+
runs-on: ubuntu-latest
9+
name: Build openSeaChest for omnios
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
- name: Build openSeaChest for OmniOS
15+
id: omni
16+
uses: vmactions/omnios-vm@v1
17+
with:
18+
usesh: true
19+
prepare: |
20+
pkg install socat
21+
22+
run: |
23+
pkg update
24+
pkg install bison build-essential flex ninja pkg-config
25+
26+
python3 -m pip install --upgrade pip setuptools wheel
27+
python3 -m pip install meson
28+
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ --buildtype=release
29+
meson install -C build
30+
31+
# builds but fails to link due to __stack_chk_fail and __stack_chk_guard being undefined.
32+
# TODO: Figure out which flags to change in meson build scripts to resolve this. use .kernel() == solaris vs .kernel() == illumos
33+
# solaris:
34+
# runs-on: ubuntu-latest
35+
# name: Build openSeaChest for Solaris
36+
# steps:
37+
# - uses: actions/checkout@v4
38+
# with:
39+
# submodules: recursive
40+
# - name: Build openSeaChest for Solaris
41+
# id: sol
42+
# uses: vmactions/solaris-vm@v1
43+
# with:
44+
# release: "11.4-gcc"
45+
# usesh: true
46+
# prepare: |
47+
# pkgutil -y -i socat
48+
49+
# run: |
50+
# pkg update
51+
# pkg install developer/build/meson
52+
53+
# meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ --buildtype=release
54+
# meson install -C build
55+
56+
freebsd:
57+
runs-on: ubuntu-latest
58+
name: Build openSeaChest for FreeBSD
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
config:
63+
- {
64+
name: "FreeBSD 14.2",
65+
releasename: "14.2",
66+
arch: "x86_64",
67+
}
68+
- {
69+
name: "FreeBSD 15.0",
70+
releasename: "15.0",
71+
arch: "x86_64",
72+
}
73+
- {
74+
name: "FreeBSD 13.5",
75+
releasename: "13.5",
76+
arch: "x86_64",
77+
}
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
submodules: recursive
82+
- name: Build openSeaChest for ${{ matrix.config.name }}
83+
id: freebsd
84+
uses: vmactions/freebsd-vm@v1
85+
with:
86+
release: ${{ matrix.config.releasename }}
87+
arch: ${{ matrix.config.arch }}
88+
usesh: true
89+
prepare: |
90+
pkg install -y curl
91+
92+
run: |
93+
pkg update
94+
pkg install -y meson
95+
96+
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ --buildtype=release
97+
meson install -C build
98+
99+
dragonflybsd:
100+
runs-on: ubuntu-latest
101+
name: Build openSeaChest for DragonflyBSD
102+
steps:
103+
- uses: actions/checkout@v4
104+
with:
105+
submodules: recursive
106+
- name: Build openSeaChest for DragonflyBSD
107+
id: dragonfly
108+
uses: vmactions/dragonflybsd-vm@v1
109+
with:
110+
usesh: true
111+
prepare: |
112+
pkg install -y socat
113+
114+
run: |
115+
pkg update
116+
pkg install -y meson
117+
118+
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ --buildtype=release
119+
meson install -C build

src/EULA.c

+37-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ static void print_Win_Getopt_Licenses(void)
467467
#if defined(__FreeBSD__)
468468
static void print_FreeBSD_License(void)
469469
{
470-
printf("Copyright 1992 - 2019 The FreeBSD Project.\n\n");
470+
printf("Copyright 1992 - 2025 The FreeBSD Project.\n\n");
471471
printf("Redistribution and use in source and binary forms, with or without\n");
472472
printf("modification, are permitted provided that the following conditions are met :\n");
473473
printf("\n");
@@ -495,6 +495,40 @@ static void print_FreeBSD_License(void)
495495
}
496496
#endif //__FreeBSD__
497497

498+
#if defined(__DragonFly__)
499+
static void print_DragonFlyBSD_License(void)
500+
{
501+
printf("Copyright (c) 2003-2024 The DragonFly Project. All rights reserved.\n\n");
502+
printf("Redistribution and use in source and binary forms, with or without\n");
503+
printf("modification, are permitted provided that the following conditions are met:\n");
504+
printf("\n");
505+
printf("1. Redistributions of source code must retain the above copyright\n");
506+
printf(" notice, this list of conditions and the following disclaimer.\n");
507+
printf("2. Redistributions in binary form must reproduce the above copyright\n");
508+
printf(" notice, this list of conditions and the following disclaimer in\n");
509+
printf(" the documentation and/or other materials provided with the\n");
510+
printf(" distribution.\n");
511+
printf("3. Neither the name of The DragonFly Project nor the names of its\n");
512+
printf(" contributors may be used to endorse or promote products derived\n");
513+
printf(" from this software without specific, prior written permission.\n");
514+
printf("\n");
515+
printf("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n");
516+
printf("``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n");
517+
printf("LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n");
518+
printf("FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n");
519+
printf("COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n");
520+
printf("INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,\n");
521+
printf("BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n");
522+
printf("LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n");
523+
printf("AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n");
524+
printf("OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n");
525+
printf("OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n");
526+
printf("SUCH DAMAGE.\n");
527+
printf("\n\n");
528+
}
529+
530+
#endif //__DragonFly__
531+
498532
#if defined(__GLIBC__)
499533
static void print_GNU_LGPL_License(void)
500534
{
@@ -743,6 +777,8 @@ void print_Open_Source_Licenses(void)
743777
// May need a way to access that flag to determine when this should or should-not be part of the license
744778
// output.-TJE
745779
print_Open_Fabrics_NVMe_IOCTL_License();
780+
#elif defined (__DragonFly__)
781+
print_DragonFlyBSD_License();
746782
#elif defined(__FreeBSD__)
747783
print_FreeBSD_License();
748784
#elif defined(__linux__)

src/openseachest_util_options.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const char* deviceHandleExample = "/dev/sg<#>";
3232
const char* deviceHandleName = "<sg_device>";
3333
const char* commandWindowType = "terminal";
3434
# endif
35-
#elif defined(__FreeBSD__)
35+
#elif defined(__FreeBSD__) || defined (__DragonFly__)
3636
const char* deviceHandleExample = "/dev/da<#>";
3737
const char* deviceHandleName = "<da_device>";
3838
const char* commandWindowType = "shell";
@@ -118,6 +118,9 @@ void print_Elevated_Privileges_Text(void)
118118
printf("In Linux, put sudo before the command. This may require inputting your login password.\n");
119119
printf("In Linux, log in to a root terminal (su), then execute the command. This requires the root password.\n");
120120
# endif
121+
# elif defined(__DragonFly__)
122+
printf("In DragonFlyBSD, put sudo before the command. This may require inputting your login password.\n");
123+
printf("In DragonFlyBSD, log in to a root terminal (su), then execute the command. This requires the root password.\n");
121124
# elif defined(__FreeBSD__)
122125
printf("In FreeBSD, put sudo before the command. This may require inputting your login password.\n");
123126
printf("In FreeBSD, log in to a root terminal (su), then execute the command. This requires the root password.\n");

subprojects/wingetopt

0 commit comments

Comments
 (0)