Skip to content

Commit 6f7cc25

Browse files
pgodwinclaude
andcommitted
test(e2e): pin mtools and flopgen (binaries + source) in-repo
Add back the FAT12 image tooling the e2e floppy-pack step depends on, alongside the already-pinned MSVC kit: - mtools/ — mcopy/mformat/etc. binaries + mtools-4.0.10.tar.gz source - flopgen — win + posix binaries + Flopgen-0.1.0.tar.gz source These are small and build/pack the e2e floppies, so they travel with the repo. The emulators (86box, minivmac, snow) and the large MPW/SDK disk images remain gitignored (fetched locally). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 059e662 commit 6f7cc25

38 files changed

Lines changed: 533 additions & 9 deletions

tools/end-to-end/.gitignore

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
/tools/*
1818
/tmp/
1919

20-
# ...except the MSVC 1.x/NT SDK kits: legacy compilers that are effectively
21-
# unobtainable now, small (~37 MB), and required to rebuild the Win16/Win32
22-
# tools — so they are pinned in-repo.
23-
!/tools/msvc/
20+
# (The specific tooling to keep is re-included at the bottom of this file, after
21+
# all other rules, so those negations have the last word.)
2422

2523
# --- Build outputs -----------------------------------------------------------
2624
# Scoped to our source dirs on purpose: a global *.exe/*.obj/*.lib would also
@@ -51,9 +49,22 @@ windows/win32/script.txt
5149
# Per-run output written next to the .EXE
5250
results.txt
5351

54-
# --- Pin the ENTIRE MSVC kit (must be the LAST word) -------------------------
55-
# The repo-root .gitignore ignores *.exe and *.dll, which would strip the MSVC
56-
# compilers/linkers (CL.EXE, LINK.EXE, the C1/C2 passes, runtime DLLs). This
57-
# negation comes after every other rule so it wins: everything under the pinned
58-
# msvc kit is committed verbatim, artifact-extension or not.
52+
# --- Pin legacy tooling that must travel with the repo (LAST word) -----------
53+
# The repo-root .gitignore ignores *.exe and *.dll, and /tools/* above ignores
54+
# these dirs; these negations come after every other rule so they win. Each is
55+
# pinned in-repo because it is small, effectively unobtainable, and required to
56+
# build/pack the e2e floppies — committed verbatim, artifact-extension or not.
57+
#
58+
# msvc/ — legacy MSVC 1.x/NT compilers/linkers (CL/LINK/C1/C2, runtime DLLs)
59+
# mtools/ — FAT12 image manipulation (mcopy/mformat...) + source tarball
60+
# flopgen — the floppy-image packer (win + posix binaries) + source tarball
61+
#
62+
# Still ignored: the emulators (86box, minivmac, snow) and the big MPW/SDK disk
63+
# images and archives.
64+
!/tools/msvc/
5965
!/tools/msvc/**
66+
!/tools/mtools/
67+
!/tools/mtools/**
68+
!/tools/flopgen
69+
!/tools/flopgen.exe
70+
!/tools/Flopgen-0.1.0.tar.gz
747 KB
Binary file not shown.

tools/end-to-end/tools/flopgen

3.77 MB
Binary file not shown.

tools/end-to-end/tools/flopgen.exe

21.2 MB
Binary file not shown.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#!/bin/sh
2+
# Copyright 2004 Feuz Stefan.
3+
# Copyright 2007 Adam Tkac.
4+
# This file is part of mtools.
5+
#
6+
# Mtools is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# Mtools is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with Mtools. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
# amuFormat.sh Formats various types and sizes of PC-Cards, according to the
20+
# AMU-specification
21+
#
22+
# parameters: $1: Card Type: The Card Type is written as disk/volume-label
23+
# to the boot-record
24+
# The string should have a length of max. 11 characters.
25+
#
26+
# $2: Drive character (b:, c:)
27+
#
28+
# 10-12-2003 lct created
29+
#
30+
vers=1.4
31+
32+
#echo "debug: $0,$1,$2,$3,$4"
33+
34+
#
35+
# main()
36+
#
37+
if [ $# -ne 2 ] ; then
38+
echo "Usage: amuFormat.sh <Card Type> <drive>" >&2
39+
echo "<Card Type> has to be defined in amuFormat.sh itself" >&2
40+
echo "<drive> has to be defined in mtools.conf" >&2
41+
exit 1
42+
fi
43+
44+
echo "amuFormat $vers started..."
45+
46+
drive="$2"
47+
48+
case "$1" in
49+
8MBCARD-FW)
50+
## using the f: or g: drive for fat12 formatting...
51+
## see mtools.conf file...
52+
case "$2" in
53+
[bB]:) drive="f:" ;;
54+
[cC]:) drive="g:" ;;
55+
*) echo "Drive $2 not supported."; exit 1 ;;
56+
esac
57+
cylinders=245 heads=2 cluster_size=8
58+
;;
59+
32MBCARD-FW)
60+
#from amu_toolkit_0_6:
61+
#mformat -t489 -h4 -c4 -n32 -H32 -r32 -vPC-CARD -M512 -N0000 c:
62+
cylinders=489 heads=4 cluster_size=4
63+
;;
64+
64MBCARD-FW)
65+
echo "***** WARNING: untested on AvHMU, exiting *****"
66+
exit 1
67+
cylinders=245 heads=2 cluster_size=8
68+
;;
69+
1GBCARD-FW)
70+
# from amu_toolkit_0_6:
71+
#mformat -t2327 -h16 -c64 -n63 -H63 -r32 -v AMU-CARD -M512 -N 0000 c:
72+
echo "***** WARNING: untested on AvHMU *****"
73+
cylinders=2327 heads=16 cluster_size=64
74+
;;
75+
64MBCARDSAN)
76+
# from amu_toolkit_0_6:
77+
#mformat -t489 -h8 -c4 -n32 -H32 -r32 -v AMU-CARD -M512 -N 0000 c:
78+
cylinders=489 heads=8 cluster_size=4
79+
;;
80+
#
81+
# insert new cards here...
82+
#
83+
*)
84+
echo "Card not supported."
85+
exit 1
86+
;;
87+
esac
88+
89+
echo "Formatting card in slot $2 as $1"
90+
91+
## initialise partition table
92+
mpartition -I "$drive"
93+
94+
# write a partition table
95+
mpartition -c -t$cylinders -h$heads -s32 -b32 "$drive"
96+
97+
## write boot-record, two FATs and a root-directory
98+
mformat -c$cluster_size -v "$1" "$drive"
99+
100+
minfo "$2"
101+
mdir "$2"
102+
103+
echo "done."
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
#!/bin/sh
2+
# Copyright 1994,2002 David C. Niemi.
3+
# Copyright 1996,1997,2001-2003,2010 Alain Knaff.
4+
# This file is part of mtools.
5+
#
6+
# Mtools is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# Mtools is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with Mtools. If not, see <http://www.gnu.org/licenses/>.
18+
# uz [file...]
19+
# lz [file...]
20+
#
21+
# If called "uz", gunzips and extracts a gzip'd tar'd archive.
22+
# If called "lz", gunzips and shows a listing of a gzip'd tar'd archive.
23+
#
24+
# Requires: gzip and tar in the user's path. Should work with most tars.
25+
# "-" is now used for backwards compatibility with antique tars, e.g. SCO.
26+
#
27+
# 1994/02/19 DCN Created (as a trivial, but useful script)
28+
# 1994/12/01 DCN Combined uz and lz, added suffix handling
29+
# 2002/09/11 DCN Added bzip2 support
30+
# 2010/10/16 AKN Added lzip support
31+
#
32+
# Copyright (C) 1994, 2002 David C. Niemi (niemi at tuxers dot net)
33+
# The author requires that any copies or derived works include this
34+
# copyright notice; no other restrictions are placed on its use.
35+
#
36+
37+
set -e
38+
set -u
39+
40+
## Default unzipping command
41+
uzcmd='gzip -cd'
42+
43+
case $0 in
44+
*uz)
45+
tarparam="-pxvf"
46+
zipparam=""
47+
action="Extracting from "
48+
;;
49+
*lz)
50+
tarparam="-tvf"
51+
zipparam="-l"
52+
action="Reading directory of "
53+
;;
54+
*)
55+
echo "$0: expect to be named either \"uz\" or \"lz\"." >&2
56+
exit 1
57+
;;
58+
esac
59+
60+
if [ $# = 0 ]; then
61+
echo "$action standard input." >&2
62+
$uzcmd - | tar "$tarparam" -
63+
exit 0
64+
fi
65+
66+
while [ $# -ge 1 ]; do
67+
echo >&2
68+
found=
69+
70+
for suffix in "" .gz .tgz .tar.gz .z .tar.z .taz .tpz .Z .tar.Z .tar.bz2 tar.lz .zip .jar .war .ear .aar .tar.xz; do
71+
if [ -r "${1}$suffix" ]; then
72+
found=$1$suffix
73+
break
74+
fi
75+
done
76+
77+
unzip=0
78+
case $found in
79+
*.tar.bz2 | *.tb2)
80+
uzcmd='bzip2 -cd'
81+
;;
82+
*.zip | *.jar | *.war | *.ear | *.aar)
83+
unzip=1
84+
;;
85+
*.tar.lz)
86+
uzcmd='lzip -cd'
87+
;;
88+
*.tar.xz)
89+
uzcmd='xz -cd'
90+
;;
91+
esac
92+
if [ -z "$found" ]; then
93+
echo "$0: could not read \"$1\"." >&2
94+
else
95+
echo "$action \"$found\"." >&2
96+
if [ $unzip = 1 ]; then
97+
unzip $zipparam -- "$found"
98+
else
99+
$uzcmd -- "$found" | tar "$tarparam" -
100+
fi
101+
fi
102+
shift
103+
done
104+
105+
exit 0
242 KB
Binary file not shown.
242 KB
Binary file not shown.
242 KB
Binary file not shown.
242 KB
Binary file not shown.

0 commit comments

Comments
 (0)