ivi-cli
LOW
maintainer ShortArrow
0 votes
scanned 2026-10-20 09:27:54.737837
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: ShortArrow <bamboogeneral@shortarrow.jp>
2
3
# Built from source against the system .NET, as the counterpart to
4
# ivi-cli-bin. The two exist for different reasons rather than as a default
5
# and an alternative:
6
#
7
# ivi-cli links the system runtime, so .NET security fixes arrive
8
# through pacman and the install is a few MB.
9
# ivi-cli-bin carries its own runtime, so it needs no .NET at all.
10
#
11
# Size is not the distinction. On a machine with no .NET, pulling in
12
# aspnet-runtime costs ~97 MiB of dotnet-runtime + aspnet-runtime +
13
# dotnet-host + libunwind, against ~102 MiB for the self-contained build —
14
# close enough to a wash. This package is the better choice when the
15
# runtime is already present or shared with other .NET software.
16
#
17
# aspnet-runtime rather than dotnet-runtime: the CLI references
18
# Microsoft.AspNetCore.App (ivicli api start embeds an ASP.NET Core
19
# listener), so the base runtime alone leaves it refusing to start with
20
# "No frameworks were found".
21
22
pkgname=ivi-cli
23
# The release version as tagged upstream. pacman refuses a `-` in pkgver, and
24
# without one vercmp still orders 0.5.0beta.1 after 0.4.0 and before
25
# 0.5.0beta.2 and 0.5.0, so a stable release upgrades a beta without an epoch.
26
_pkgver=0.5.0-beta.1
27
pkgver=${_pkgver//-/}
28
pkgrel=1
29
pkgdesc="Integrated CLI for managing, diagnosing, and operating VISA/IVI instruments"
30
arch=('x86_64')
31
url="https://github.com/ShortArrow/ivi-cli"
32
license=('MIT' 'Apache-2.0')
33
depends=('aspnet-runtime')
34
makedepends=('dotnet-sdk')
35
conflicts=('ivi-cli-bin')
36
# The publish output is managed assemblies next to a generated apphost;
37
# there are no sources to split out, so a debug package would carry an
38
# empty /usr/src/debug and a build-id symlink pointing at nothing.
39
options=('!debug')
40
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$_pkgver.tar.gz")
41
sha256sums=('805e39fc2b66bc71d568c7725866e112845d85cbab155c252085569232581dd3')
42
43
prepare() {
44
cd "$srcdir/$pkgname-$_pkgver"
45
46
# global.json pins the SDK to 10.0.204 with rollForward=latestFeature,
47
# which cannot roll down to the 10.0.1xx band Arch ships — the build
48
# aborts with "A compatible .NET SDK was not found". The pin exists so
49
# upstream CI builds on one known SDK; a distribution package builds on
50
# the SDK the distribution has, and both produce the same net10.0 output.
51
rm -f global.json
52
}
53
54
build() {
55
cd "$srcdir/$pkgname-$_pkgver"
56
57
# Keep the SDK's writes inside the build directory: NuGet and the CLI
58
# otherwise populate $HOME, which makepkg does not own.
59
export DOTNET_CLI_HOME="$srcdir/dotnet-home"
60
export DOTNET_CLI_TELEMETRY_OPTOUT=1
61
export DOTNET_NOLOGO=1
62
export NUGET_PACKAGES="$srcdir/nuget"
63
64
# RestoreLockedMode=false because the committed lock files are written for
65
# the SDK patch band the project's CI uses, and the Arch dotnet-sdk moves
66
# independently of it; locked restore would fail on lock files that are
67
# correct upstream.
68
# AllowMissingPrunePackageData because Arch's dotnet-sdk ships without the
69
# PrunePackageData folder, and without the flag the ASP.NET Core reference
70
# fails the build outright (NETSDK1226). Pruning only trims package
71
# references the framework already provides, so its absence costs nothing
72
# here beyond a slightly larger intermediate set.
73
dotnet publish src/IviCli.Cli/IviCli.Cli.csproj \
74
--configuration Release \
75
--self-contained false \
76
-p:RestoreLockedMode=false \
77
-p:AllowMissingPrunePackageData=true \
78
-p:Version="$_pkgver" \
79
--output "$srcdir/publish"
80
81
# The binary emits its own completions. bash and zsh are what it supports
82
# (plus powershell, which has no Arch filesystem convention); there is no
83
# fish emitter upstream, so no fish completion is shipped.
84
"$srcdir/publish/ivicli" completion bash > "$srcdir/ivicli.bash"
85
86
# The zsh emitter returns an eval-style snippet that defines _ivicli and
87
# then calls compdef. As a site-function file it would never bind, because
88
# compinit only registers files carrying a #compdef tag, so two lines of
89
# packaging glue wrap it: the tag, and a trailing call so the first Tab
90
# completes rather than merely registering.
91
{
92
echo '#compdef ivicli'
93
"$srcdir/publish/ivicli" completion zsh
94
echo '_ivicli "$@"'
95
} > "$srcdir/_ivicli"
96
}
97
98
package() {
99
cd "$srcdir/$pkgname-$_pkgver"
100
101
# A framework-dependent publish is an apphost next to its managed
102
# assemblies, which have to stay together; /usr/lib/$pkgname holds the set
103
# and /usr/bin carries the entry point.
104
install -dm755 "$pkgdir/usr/lib/$pkgname"
105
find "$srcdir/publish" -maxdepth 1 -type f \
106
! -name '*.pdb' ! -name '*.xml' \
107
-exec install -Dm644 -t "$pkgdir/usr/lib/$pkgname" {} +
108
chmod 755 "$pkgdir/usr/lib/$pkgname/ivicli"
109
install -dm755 "$pkgdir/usr/bin"
110
ln -s "/usr/lib/$pkgname/ivicli" "$pkgdir/usr/bin/ivicli"
111
112
install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
113
install -Dm644 LICENSE-APACHE "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
114
install -Dm644 THIRD-PARTY-NOTICES.md \
115
"$pkgdir/usr/share/doc/$pkgname/THIRD-PARTY-NOTICES.md"
116
117
install -Dm644 "$srcdir/ivicli.bash" \
118
"$pkgdir/usr/share/bash-completion/completions/ivicli"
119
install -Dm644 "$srcdir/_ivicli" "$pkgdir/usr/share/zsh/site-functions/_ivicli"
120
}
121
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-20 09:27:54 | Low | 1 |