dotnet-system-reactive
LOW
maintainer ChrisTX
0 votes
scanned 2026-10-31 07:58:04.077835
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: Christian Pfeiffer <cpfeiffer at rev-crew dot info>
2
# shellcheck disable=SC2034,SC2154
3
# shellcheck shell=bash
4
5
pkgname=dotnet-system-reactive
6
_nugetid=System.Reactive
7
pkgver=7.0.0
8
pkgrel=1
9
pkgdesc="Reactive Extensions (Rx) for .NET, System.Reactive (NuGet package)"
10
arch=('any')
11
url='https://github.com/dotnet/reactive'
12
license=('MIT')
13
_dotnetsdkver="10.0"
14
makedepends=(
15
dotnet-sdk-"$_dotnetsdkver"
16
perl
17
)
18
# The commit the package was published from (tag rxnet-v7.0.0)
19
_commit="cf59bed2247fdd8f8c3c6fe05c328934518c0c96"
20
source=("reactive-$_commit.tar.gz::$url/archive/$_commit.tar.gz")
21
sha512sums=('29b580b595c63a0c5ba54cc54d89651b99328d199fb3488b0c865e8a98689176229ca1d1af38eb74e0ecb0d27a40fd5d3045314ed716005b27cd06d8b9bbfd22')
22
b2sums=('5da8b0350cbf0f26a95ca300b7d6011bf1e9c1a966f9e88bf5b1a0b210546478fbfb85b295e8abb887c4dd8a94cc6c1a979e82f99cbcb8254612159d5b1832b7')
23
24
_dotnet_env() {
25
export NUGET_PACKAGES="$srcdir/nuget"
26
export DOTNET_CLI_HOME="$srcdir/dotnet-home"
27
export DOTNET_CLI_TELEMETRY_OPTOUT=1
28
export DOTNET_NOLOGO=1
29
30
# Versions as in the official build, which Nerdbank.GitVersioning computes from git. The file
31
# version ends in the first two bytes of the commit. The SDK would add the commit of the repository
32
# this PKGBUILD is in to the informational version. Package validation would need the previous
33
# release from nuget.org.
34
_build_arguments=(
35
--configuration Release
36
-p:Version="$pkgver"
37
-p:FileVersion="$pkgver.$((16#${_commit:0:4}))"
38
-p:InformationalVersion="$pkgver+${_commit:0:10}"
39
-p:IncludeSourceRevisionInInformationalVersion=false
40
-p:EnableSourceControlManagerQueries=false
41
-p:RepositoryCommit="$_commit"
42
-p:RepositoryUrl="$url"
43
-p:EnablePackageValidation=false
44
-p:IncludeSymbols=false
45
)
46
}
47
48
prepare() {
49
cd "reactive-$_commit/Rx.NET/Source" || exit
50
# Upstream builds on Windows, where MSBuild also finds Directory.build.props and .targets
51
local _file
52
for _file in Directory.build.{props,targets} {src,tests}/Directory.build.{props,targets}; do
53
mv "$_file" "${_file/Directory.build/Directory.Build}"
54
done
55
sed -i 's/Directory\.build\./Directory.Build./g' {src,tests}/Directory.Build.{props,targets}
56
# Nerdbank.GitVersioning and Source Link need git, see _dotnet_env for the versions
57
perl -0pi -e 's/\s*<PackageReference\s+Include="(Microsoft\.SourceLink\.GitHub|Nerdbank\.GitVersioning)".*?\/>//gs' \
58
Directory.Build.props
59
60
# The .NET Framework, UWP and Windows builds need Windows SDKs, so leave them out of the projects
61
# and of upstream's hand-written nuspec
62
sed -i 's|<TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0;net8.0-windows10.0.19041</TargetFrameworks>|<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>|' \
63
src/System.Reactive/System.Reactive.csproj \
64
src/System.Reactive.MakeRefAssemblies/System.Reactive.MakeRefAssemblies.csproj
65
sed -i -E \
66
-e '/<group targetFramework="(net472|net8\.0-windows10\.0\.19041|uap10\.0\.18362|\.NETFramework4\.7\.2|UAP10\.0\.18362)">/,/<\/group>/d' \
67
-e '/<group targetFramework="(net8\.0-windows10\.0\.19041|\.NETFramework4\.7\.2|UAP10\.0\.18362)" \/>/d' \
68
-e '/<frameworkAssemblies>/,/<\/frameworkAssemblies>/d' \
69
-e '/(net472|uap10\.0\.18362|net8\.0-windows10\.0\.19041)\\System\.Reactive\.dll|\.pdb"/d' \
70
src/System.Reactive/System.Reactive.nuspec
71
# Only test on the .NET runtime that's installed
72
sed -i -E 's|<TargetFrameworks>[^<]*</TargetFrameworks>|<TargetFrameworks>net10.0</TargetFrameworks>|' \
73
tests/Tests.System.Reactive/Tests.System.Reactive.csproj
74
}
75
76
build() {
77
_dotnet_env
78
cd "reactive-$_commit/Rx.NET/Source" || exit
79
# The nuspec takes the analyzer from its build output. The assemblies are signed with the key in
80
# the repository, giving them the same strong names as upstream's.
81
dotnet build src/System.Reactive.Analyzers/System.Reactive.Analyzers.csproj "${_build_arguments[@]}"
82
dotnet pack "src/$_nugetid/$_nugetid.csproj" "${_build_arguments[@]}" --output "$srcdir/nupkg"
83
}
84
85
check() {
86
_dotnet_env
87
cd "reactive-$_commit/Rx.NET/Source" || exit
88
dotnet test tests/Tests.System.Reactive/Tests.System.Reactive.csproj "${_build_arguments[@]}"
89
}
90
91
# Fails if a binary in $pkgdir, also inside the .nupkg files there, is identical to one of the packages
92
# restored from a remote feed like nuget.org into $1, so no prebuilt binary slips in instead of one built
93
# from source
94
_check_prebuilt() {
95
local _extracted="$srcdir/check-prebuilt" _metadata _file _hash _found=0
96
local _binaries=(-type f '(' -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.so.*' -o -name '*.dylib' ')')
97
local -A _prebuilt=()
98
while IFS= read -r -d '' _metadata; do
99
grep -qE '"source": *"https?://' "$_metadata" || continue
100
while IFS= read -r -d '' _file; do
101
_prebuilt[$(sha256sum <"$_file")]="${_file#"$1"/}"
102
done < <(find "${_metadata%/*}" "${_binaries[@]}" -print0)
103
done < <(find "$1" -name .nupkg.metadata -print0)
104
105
rm -rf "$_extracted"
106
mkdir -p "$_extracted"
107
while IFS= read -r -d '' _file; do
108
mkdir -p "$_extracted/${_file#"$pkgdir"/}"
109
bsdtar -xf "$_file" -C "$_extracted/${_file#"$pkgdir"/}"
110
done < <(find "$pkgdir" -type f -name '*.nupkg' -print0)
111
while IFS= read -r -d '' _file; do
112
_hash=$(sha256sum <"$_file")
113
if [[ -v "_prebuilt[$_hash]" ]]; then
114
echo "Prebuilt binary: ${_file#"$_extracted"/} is ${_prebuilt[$_hash]}" >&2
115
_found=1
116
fi
117
done < <(find "$pkgdir" "$_extracted" "${_binaries[@]}" -print0)
118
rm -rf "$_extracted"
119
return "$_found"
120
}
121
122
package() {
123
install -Dm644 "$srcdir/nupkg/$_nugetid.$pkgver.nupkg" -t "$pkgdir/usr/share/dotnet/nuget-packages/"
124
install -Dm644 "reactive-$_commit/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
125
126
_check_prebuilt "$srcdir/nuget"
127
}
128
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-31 07:58:04 | Low | 1 |