diff options
author | Eric Wong <e@80x24.org> | 2023-09-08 13:09:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-09-08 20:43:23 +0000 |
commit | 053ffb197e57c477bc21c0c4aa71bb3a741cff9a (patch) | |
tree | b8bb1c2a281bd065804f22a5209e13ab3d27278c /ci/profiles.sh | |
parent | bb862be465bbacb1b5be183c29693d3ef4c35167 (diff) | |
download | public-inbox-053ffb197e57c477bc21c0c4aa71bb3a741cff9a.tar.gz |
Still a work-in-progress, but OpenBSD's pkg_add/pkg_delete seem to be working somewhat. The dependency system seems to need some extra help to ensure leaf packages with their own dependencies (e.g. `xapian-bindings-perl') get uninstalled before their dependencies (`xapian-core'). Deduplicating the command-line is also required since both pkg_add and pkg_delete will repeat the installation/removal if a package is specified multiple times in the same invocation.
Diffstat (limited to 'ci/profiles.sh')
-rwxr-xr-x | ci/profiles.sh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/ci/profiles.sh b/ci/profiles.sh index 55b998d7..04cefa15 100755 --- a/ci/profiles.sh +++ b/ci/profiles.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org> +# Copyright (C) all contributors <meta@public-inbox.org> # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> # Prints OS-specific package profiles to stdout (one per line) to use @@ -7,7 +7,7 @@ # set by os-release(5) or similar ID= VERSION_ID= -case $(uname -o) in +case $(uname -o 2>/dev/null || uname -s) in GNU/Linux) for f in /etc/os-release /usr/lib/os-release do @@ -42,12 +42,22 @@ FreeBSD) echo >&2 "ID=$ID $(uname -r) too old to support"; exit 1 } + ;; +OpenBSD) + ID=openbsd + VERSION_ID=$(uname -r | cut -d . -f 1) + test "$VERSION_ID" -lt 7 && { + echo >&2 "ID=$ID $(uname -r) too old to support"; + exit 1 + } + ;; esac case $ID in freebsd) PKG_FMT=pkg ;; debian|ubuntu) PKG_FMT=deb ;; centos|redhat|fedora) PKG_FMT=rpm ;; +openbsd) PKG_FMT=pkg_add ;; # unsure about name, but it's not FreeBSD `pkg' *) echo >&2 "PKG_FMT undefined for ID=$ID in $0" esac @@ -76,4 +86,13 @@ essential devtest all Search::Xapian- EOF ;; +openbsd-7) sed "s/^/$PKG_FMT /" <<EOF +all devtest- +all devtest Inline::C- +all devtest Inline::C +v2essential +essential +essential devtest- +EOF + ;; esac |