bsd-games2

maintainer AntiComposite · 9 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The source is a tarball from ibiblio.org, a well-known public archive for Linux software, hosting the original upstream source code; building from this source is standard practice and poses no significant risk.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The source is a tarball from ibiblio.org, a well-known public archive for Linux software, hosting the original upstream source code; building from this source is standard practice and poses no significant risk.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:21 "$pkgname-$pkgver.tar.gz::https://www.ibiblio.org/pub/linux/games/bsd-games-$pkgver.tar.gz"

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: AntiCompositeNumber <anticompositenumber@gmail.com>
2# Contributor: Laurent Carlier <lordheavym@gmail.com>
3# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
4# Contributor: Chris Brannon <cmbrannon79@gmail.com>
5# Contributor: Abhishek Dasgupta <abhidg@gmail.com>
6# Contributor: SmackleFunky <smacklefunky@optusnet.com.au>
7
8pkgname=bsd-games2
9pkgver=2.17
10pkgrel=20
11pkgdesc='Linux port of the collection of BSD command line games, "junk pile" included'
12url='https://ibiblio.org/pub/linux/games/'
13arch=('x86_64')
14install="$pkgname.install"
15license=('BSD')
16depends=('gcc-libs' 'words' 'sh')
17makedepends=('flex' 'bison' 'm4')
18provides=('bsd-games')
19conflicts=('bsd-games')
20source=(
21 "$pkgname-$pkgver.tar.gz::https://www.ibiblio.org/pub/linux/games/bsd-games-$pkgver.tar.gz"
22 config.params
23 stdio.h.diff
24 gamescreen.h.diff
25 getline.diff
26 number.c.diff
27 bsd-games-2.17-64bit.patch
28 bad-ntohl-cast.diff
29 null-check.diff
30 hunt-sigpause.diff
31)
32md5sums=('238a38a3a017ca9b216fc42bde405639'
33 '0d11fba067dafb30425dac49ad454df1'
34 '784f68c796b9e099ac008aecef1af998'
35 '9c0fa6e2345bd0a7945c9a41d5ba68aa'
36 '5356bd6999ae53dd27cb2a0f837a3e70'
37 '47249a90f38ccb4dd07625b245bbc728'
38 '257813b76a41c8b2c02701571c804227'
39 '3d21a9dad2e603ddf3842972e4ff85a1'
40 'a43ca0b4b9ebc4eec26372c52014ac0a'
41 '4e31136605d341ff4ec81a053f742853')
42
43prepare() {
44 cd "bsd-games-$pkgver"
45
46 [ "$CARCH" = "x86_64" ] && patch -p1 < "$srcdir/bsd-games-2.17-64bit.patch"
47 cp "${srcdir}/config.params" .
48
49 # Several games use their own internal functions named getline. All
50 # are different, and none is the getline from glibc. So we need a patch
51 # in order to compile. Each internal getline function is prefixed
52 # with the name of the game. -- Chris Brannon
53 patch -p1 -i "${srcdir}/getline.diff"
54
55 patch -p1 -i "${srcdir}/stdio.h.diff"
56 patch -p1 -i "${srcdir}/gamescreen.h.diff"
57
58 # Incorporated some fixes from Debian
59 patch -p1 -i "${srcdir}/number.c.diff"
60 # ntohl returns uint32_t, not unsigned long:
61 patch -p1 -i "${srcdir}/bad-ntohl-cast.diff"
62 # And add a NULL pointer check to the "hunt" program, fixing a segfault.
63 patch -p1 -i "${srcdir}/null-check.diff"
64 # Remove sigpause in "hunt", see https://bugzilla.redhat.com/show_bug.cgi?id=2152550
65 patch -p1 -i "${srcdir}/hunt-sigpause.diff"
66
67 sed -i "s/FISH/GO-FISH/g; s/\.Nm fish/\.Nm go-fish/g" fish/fish.6
68 sed -i "s/tenths/tenth/g" tests/number.-0.1
69 sed -i "s/Elegy{ Written in a Country Church{-| }Yard:/Elegy{ Written in a Country Church{-| }Yard}:/g" \
70 quiz/datfiles/poetry
71 sed -i "s/\.tI friend/\.It friend/g" hunt/hunt/hunt.6.in
72 sed -i "s/it\'s initial/its initial/g" backgammon/teachgammon/ttext1.c
73 sed -i "s/two player\'s/two players/g" backgammon/teachgammon/ttext2.c
74 sed -i "s/\.I range/\.It range/g" arithmetic/arithmetic.6
75 sed -i "s/game were the/game where the/g" gomoku/gomoku.6
76
77 # The wargames script expects binaries in /usr/games, and this
78 # path is hard-coded.
79 # Prior to release 2.17-10 of the ArchLinux package, wargames was
80 # broken, since binaries are in /usr/bin instead.
81 sed -i -e 's|/usr/games|/usr/bin|g' wargames/wargames
82
83
84 # Use CFLAGS from makepkg instead.
85 # -Werror=format-security had to be disabled because this code was written
86 # back when printf was cool and security hadn't been invented yet.
87 echo "bsd_games_cfg_other_cflags='${CFLAGS} -Wno-error=format-security'" >> config.params
88}
89
90build() {
91 cd "bsd-games-$pkgver"
92
93 ./configure
94 make
95}
96
97package() {
98 cd "bsd-games-$pkgver"
99
100 sed -i "s%PKGDIR%$pkgdir%g" hide-game install-man install-score Makeconfig subst.sed
101 make install
102 # This make install command does install to $pkgdir, because of the
103 # change to config.params in the build function.
104
105 # Fix permissions
106 rmdir "${pkgdir}/tmp"
107 install -dm755 "${pkgdir}/usr/share/bsdgames/data/hack/save"
108 chown -R root:games "${pkgdir}/var/lib/bsdgames"
109 chmod 664 "${pkgdir}"/var/lib/bsdgames/*
110 chmod 664 "${pkgdir}"/var/lib/bsdgames/{hack,phantasia}/*
111 chmod 775 "${pkgdir}"/var/lib/bsdgames/{hack,phantasia}
112
113 # Remove conflict with xscreensaver and fish
114 mv "${pkgdir}/usr/bin/fish" "${pkgdir}/usr/bin/go-fish"
115 mv "${pkgdir}/usr/share/man/man6/fish.6.gz" "${pkgdir}/usr/share/man/man6/go-fish.6.gz"
116 mv "${pkgdir}/usr/share/man/man6/worm.6.gz" \
117 "${pkgdir}/usr/share/man/man6/worm-game.6.gz"
118
119 # Install documentation and license
120 install -dm755 "$pkgdir/usr/share/doc/bsd-games"
121 install -m644 AUTHORS NEWS BUGS ChangeLog "$pkgdir/usr/share/doc/bsd-games" \
122
123 rm "${pkgdir}/usr/share/doc/trek.me"
124 install -D -m644 COPYING "${pkgdir}/usr/share/licenses/bsd-games/COPYING"
125}
126
127# vim:set ts=2 sw=2 et:
128

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 LOW 2
2026-08-02 00:16:08 LOW 2
2026-08-01 00:11:18 LOW 2
2026-07-31 00:14:10 LOW 2
2026-07-30 00:17:23 LOW 2
2026-07-29 00:25:53 LOW 2
2026-07-28 00:07:28 LOW 2
2026-07-27 00:24:32 LOW 2
2026-07-26 00:07:32 LOW 2
2026-07-25 00:13:44 LOW 2
2026-07-24 00:02:28 LOW 2
2026-07-23 00:14:47 LOW 2
2026-07-22 00:29:32 LOW 2
2026-07-21 00:24:15 LOW 2
2026-07-20 00:19:49 LOW 2
2026-07-19 00:17:08 LOW 2
2026-07-18 00:14:48 LOW 2
2026-07-17 00:06:16 LOW 2
2026-07-16 00:05:41 LOW 2
2026-07-15 00:09:25 LOW 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion