blob: ac0248feea11cbaa37b88a341fc9b140f7aa7e2e [file] [log] [blame]
Alistair Delvabeaee832021-02-24 11:27:23 -08001%define _binary_payload w9.gzdio
2Name: mtools
3Summary: mtools, read/write/list/format DOS disks under Unix
Yi Kong39bbd962022-01-09 19:41:38 +08004Version: 4.0.37
Alistair Delvabeaee832021-02-24 11:27:23 -08005Release: 1
6License: GPLv3+
7Group: Utilities/System
8URL: http://www.gnu.org/software/mtools/
9Source: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
10Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12
13%description
14Mtools is a collection of utilities to access MS-DOS disks from GNU
15and Unix without mounting them. It supports long file names, OS/2 Xdf
16disks, ZIP/JAZ disks and 2m disks (store up to 1992k on a high density
173 1/2 disk).
18
19
20%prep
21%setup -q
22
23./configure \
24 --prefix=%{buildroot}%{_prefix} \
25 --sysconfdir=/etc \
26 --infodir=%{buildroot}%{_infodir} \
27 --mandir=%{buildroot}%{_mandir} \
28 --enable-floppyd \
29
30%build
31make
32
33%clean
34echo rm -rf $RPM_BUILD_ROOT
35[ X%{buildroot} != X ] && [ X%{buildroot} != X/ ] && rm -fr %{buildroot}
36
37%install
38make install
39make install-info
40strip %{buildroot}%{_bindir}/mtools %{buildroot}%{_bindir}/mkmanifest %{buildroot}%{_bindir}/floppyd
41rm %{buildroot}%{_infodir}/dir
42
43%files
44%defattr(-,root,root)
45%{_infodir}/mtools.info*
46%{_mandir}/man1/floppyd.1*
47%{_mandir}/man1/floppyd_installtest.1.gz
48%{_mandir}/man1/mattrib.1*
49%{_mandir}/man1/mbadblocks.1*
50%{_mandir}/man1/mcat.1*
51%{_mandir}/man1/mcd.1*
Alistair Delvabeaee832021-02-24 11:27:23 -080052%{_mandir}/man1/mcopy.1*
53%{_mandir}/man1/mdel.1*
54%{_mandir}/man1/mdeltree.1*
55%{_mandir}/man1/mdir.1*
56%{_mandir}/man1/mdu.1*
57%{_mandir}/man1/mformat.1*
58%{_mandir}/man1/minfo.1*
59%{_mandir}/man1/mkmanifest.1*
60%{_mandir}/man1/mlabel.1*
61%{_mandir}/man1/mmd.1*
62%{_mandir}/man1/mmount.1*
63%{_mandir}/man1/mmove.1*
64%{_mandir}/man1/mpartition.1*
65%{_mandir}/man1/mrd.1*
66%{_mandir}/man1/mren.1*
67%{_mandir}/man1/mshortname.1*
68%{_mandir}/man1/mshowfat.1*
69%{_mandir}/man1/mtools.1*
70%{_mandir}/man5/mtools.5*
71%{_mandir}/man1/mtoolstest.1*
72%{_mandir}/man1/mtype.1*
73%{_mandir}/man1/mzip.1*
74%{_bindir}/amuFormat.sh
75%{_bindir}/mattrib
76%{_bindir}/mbadblocks
77%{_bindir}/mcat
78%{_bindir}/mcd
Alistair Delvabeaee832021-02-24 11:27:23 -080079%{_bindir}/mcopy
80%{_bindir}/mdel
81%{_bindir}/mdeltree
82%{_bindir}/mdir
83%{_bindir}/mdu
84%{_bindir}/mformat
85%{_bindir}/minfo
86%{_bindir}/mkmanifest
87%{_bindir}/mlabel
88%{_bindir}/mmd
89%{_bindir}/mmount
90%{_bindir}/mmove
91%{_bindir}/mpartition
92%{_bindir}/mrd
93%{_bindir}/mren
94%{_bindir}/mshortname
95%{_bindir}/mshowfat
96%{_bindir}/mtools
97%{_bindir}/mtoolstest
98%{_bindir}/mtype
99%{_bindir}/mzip
100%{_bindir}/floppyd
101%{_bindir}/floppyd_installtest
102%{_bindir}/mcheck
103%{_bindir}/mcomp
104%{_bindir}/mxtar
105%{_bindir}/tgz
106%{_bindir}/uz
107%{_bindir}/lz
108%doc NEWS
109
110%pre
111groupadd floppy 2>/dev/null || echo -n ""
112
113%post
114if [ -f %{_bindir}/install-info ] ; then
115 if [ -f %{_infodir}/dir ] ; then
116 %{_bindir}/install-info %{_infodir}/mtools.info %{_infodir}/dir
117 fi
118 if [ -f %{_infodir}/dir.info ] ; then
119 %{_bindir}/install-info %{_infodir}/mtools.info %{_infodir}/dir.info
120 fi
121fi
122
123
124%preun
125install-info --delete %{_infodir}/mtools.info %{_infodir}/dir.info
126if [ -f %{_bindir}/install-info ] ; then
127 if [ -f %{_infodir}/dir ] ; then
128 %{_bindir}/install-info --delete %{_infodir}/mtools.info %{_infodir}/dir
129 fi
130 if [ -f %{_infodir}/dir.info ] ; then
131 %{_bindir}/install-info --delete %{_infodir}/mtools.info %{_infodir}/dir.info
132 fi
133fi
134
135%changelog
Yi Kong39bbd962022-01-09 19:41:38 +0800136* Sun Dec 26 2021 Alain Knaff <alain@knaff.lu>
137- Removed mclasserase commands, which doesn't fit the coding
138 structure of the rest of mtools
139- Add support to -i option to mcd
140- Document -i in mtools.1
141- Fix a missing commad error in floppyd_io.c
142* Sun Nov 21 2021 Alain Knaff <alain@knaff.lu>
143- Fix error status of recursive listing of empty root directory
144- If recursive listing, also show matched files at level one
145- Use "seekless" reads & write internally, where possible
146- Text mode conversion refactoring
147- Misc refactoring
148* Fri Aug 06 2021 Alain Knaff <alain@knaff.lu>
149- Fix cluster padding at end of file in batch mode, and add comments about what
150 happens here
151* Fri Jul 23 2021 Alain Knaff <alain@knaff.lu>
152- Fix mcopy -s issue
153* Sat Jul 17 2021 Alain Knaff <alain@knaff.lu>
154- Fix support for partitions (broken in 4.0.30)
155- Portability fixes for Solaris 10 and 11
156- General simplification of configure script, and largefile handling
157- Tested and fixed for platforms *without* largefile support
158- In cases where lseek works with 32-bit offsets, prefer lseek64 over llseek
159- Fixed floppy sector size handling on platforms that are not Linux
160- Added support for image files on command line to mcat
161* Sat Jul 10 2021 Alain Knaff <alain@knaff.lu>
162- Simplify algorithm that choses filesystem parameters for
163 format, and align it more closely with what Win7 does
164- Fix mformatting XDF when XDF not explicitly specified on
165 mformat command line
166- easier way to enter sizes on mformat command line (mformat -C -T 1440K)
167- For small sizes, mformat assumes floppy geometries (heads 1 or 2,
168 tracks 40 or 80)
169- Handle attempts to mformat too small filesystems more gracefully
170- Enable minfo to print out additional mformat command line
171 parameters, if the present filesystem uses non-default values for
172 these
173- minfo no longer prints bigsect if smallsect is set
174- for remap filter, error when trying to write non-zero data to
175unmapped sectors
176- Fix misc compilation warnings occuring when disabling certain
177features (largefiles, raw-term)
178
179* Sat Jun 19 2021 Alain Knaff <alain@knaff.lu>
180- Move Linux-specific block device sizing code into
181 linux-specific section of devices.c
182- Error messages for all failure cases on fs_init failure
183- Fix compilation without XDF support (OpenImage signature)
184- Fix polarity of format_xdf command-line parameter of mformat
185- In XDF_IO retry enough times to actually succeed, even if
186 FDC was in a bad state before
187- Remove useless buffer flushing triggered when giving up a
188 reference to a stream node that is still referenced
189 elsewhere.
190- Clearer error message if neither size nor geometry of drive
191 to be mformatted is known
192- In mformat, make Fs dynamically allocated rather than
193 on-stack, so as to be able to use utilities supplied by
194 stream.c
195- Remove duplicate writing of backup boot sector
196- Allow to infer geometry if only size is specified
197- Protect against attempt to create zero-sized buffer
198- Code simplification in mattrib
199- Remove dead code in mpartition
200
201* Thu Jun 17 2021 Alain Knaff <alain@knaff.lu>
202- Fixed XDF floppy disk access
203- Fixed faulty behavior at end of image in mcat
204- Device/Image size handling refactoring
205- allow remap to write to zero-backed sectors (may happen if
206 buffer is flushed, and is not an error in that case)
207- Raise an error when trying to mcopy multiple source files
208 over a single destination file (rather than directory)
209- fix handling of "hidden" sectors (is a 2 byte quantity on
210 small disks, not 4 byte as previously assumed)
211- Modernize partition support. Tuned consistency check to
212 actually check about important issues (such as overlapping
213 partitions) rather than stuff nobody else cares about
214 (alignment on entire cylinder boundaries)
215- Move various "filter" options (partition, offset, swap,
216 scsi) into separate classes, rather than leaving almost
217 everything in plain_io
218- Simplify and centralize geometry handling and LBA code
219- Fix some more more compiler warnings
220* Mon May 31 2021 Alain Knaff <alain@knaff.lu>
221-Fix bug in cluster preallocation, which was accidentally introduced by compiler warning "fixes" from v4_0_28
Alistair Delvabeaee832021-02-24 11:27:23 -0800222* Sat Nov 28 2020 Alain Knaff <alain@knaff.lu>
223- Fix compilation on Macintosh
224- Ignore image file locking errors if we are performing a read-only access anyways
225- Minor man-page fixes
226* Sat Oct 24 2020 Alain Knaff <alain@knaff.lu>
227- Preserve non-updated contents of info sector, just in case it contains program code
228- When parsing config file, always use "C" locale for case-insensitive comparisons
229* Sun Mar 22 2020 Alain Knaff <alain@knaff.lu>
230- Spelling fixes in documentation
231- Permit calling "make install" with >= -j2
232- Added AC_SYS_LARGEFILE, needed for compiling on certain ARM procs
233* Sun Dec 09 2018 Alain Knaff <alain@knaff.lu>
234- Address lots of compiler warnings (assignments between different types)
235- Network speedup fixes for floppyd (TCP_CORK)
236- Typo fixes
237- Explicitly pass available target buffer size for character set conversions
238* Sun Dec 02 2018 Alain Knaff <alain@knaff.lu>
239- Fixed -f flag for mformat (size is KBytes, rather than sectors)
240- Fixed toupper/tolower usage (unsigned char rather than plain signed)
241* Sat Nov 24 2018 Alain Knaff <alain@knaff.lu>
242- Fixed compilation for MingW
243- After MingW compilation, make sure executable has .exe extension
244- Addressed compiler warnings
245- Fixed length handling in character set conversion (Unicode file names)
246- Fixed matching of character range, when containing Unicode characters (mdir "c:test[α-ω].exe")
247- Fixed initialization of my_scsi_cmd constructor
248* Sun Nov 11 2018 Alain Knaff <alain@knaff.lu>
249- initialize directory entries to 0
250- bad message "Too few sectors" replaced with "Too many sectors"
251- apostrophe in mlabel no longer causes generation of long entry
252- option to fake system date for file creation using the SOURCE_DATE_EPOCH environment variables
253- can now be compiled with "clang" compiler
254- fallback function for strndup, for those platforms that do not have it
255- fixed a number of -Wextra warnings
256- new compressed archive formats for uz/lz
257- allow to specify number of reserved sectors for FAT32.
258- file/device locking with timeout (rather than immediate failure)
259- fixed support for BPB-less legacy formats.
260- removed check that disk must be an integer number of tracks.
261- removed .eh/.oh macros from manual pages
262* Sat Sep 29 2018 Alain Knaff <alain@knaff.lu>
263- Fix for short file names starting with character 0xE5 (by remapping it to 0x5)
264- mpartition: Partition types closer to what Microsoft uses
265- mformat: figure out LBA geometry as last resort if geometry
266is neither specified in config and/or commandline, nor can be
267queried from the device
268- mformat: use same default cluster size by size as Microsoft for FAT32
269- additional sanity checks
270- document how cluster size is picked in mformat.c man page
271- document how partition types are picked in mpartition.c man page
272* Wed Jan 09 2013 Alain Knaff <alain@knaff.lu>
273- Fix for names of iconv encodings on AIX
274- Fix mt_size_t on NetBSD
275- Fixed compilation on Mingw
276- Fixed doc (especially mformat)
277- Fix mformating of FAT12 filesystems with huge cluster sizes
278- Minfo prints image file name in mformat command line if an image
279- file name was given
280- Always generate gzip-compressed RPMs, in order to remain
281- compatible with older distributions
282- Fixed buffer overflow with drive letter in mclasserase
283* Wed Jun 29 2011 Alain Knaff <alain@knaff.lu>
284- mbadblocks now takes a list of bad blocks (either as sectors
285 or as clusters)
286- mbadblocks now is able to do write scanning for bad blocks
287- mshowfat can show cluster of specific offset
288- Enable mtools to deal with very small sector sizes...
289- Fixed encoding of all-lowercase names (no need to mangle
290 these)
291- Consider every directory entry after an ENDMARK (0x00) to be deleted
292- After writing a new entry at end of a directory, be sure to also add
293 an ENDMARK (0x00)
294- Deal with possibility of a NULL pointer being returned by
295 localtime during timestamp conversion
296* Sat Apr 16 2011 Alain Knaff <alain@knaff.lu>
297- configure.in fixes
298- fixed formatting of fat_size_calculation.tex document
299- compatibility with current autoconfig versions
300- Make it clear that label is limited to 11 characters
301- Fixed typo in initialization of FAT32 info sector
302* Sun Oct 17 2010 Alain Knaff <alain@knaff.lu>
303- Added missing -i option to mshortname
304* Sun Oct 17 2010 Alain Knaff <alain@knaff.lu>
305- Released v4_0_14:
306- New mshortname command
307- Fix floppyd for disks bigger than 2 Gig
308- Remove obsolete -z flag
309- Remove now unsupported AC_USE_SYSTEM_EXTENSIONS
310- Fixed output formatting of mdir if MTOOLS_DOTTED_DIR is set
311- Mformat now correctly writes backup boot sector
312- Fixed signedness of serial number in mlabel
313- Fixed buffer size problem in mlabel
314- Make mlabel write backup boot sector if FAT32
315- Catch situation where both clear and new label are given to mlabel
316- Quote filename parameters to scripts
317- Mformat: Close file descriptor for boot sector
318- Added lzip support to scripts/uz
319- Added Tot_sectors option to mformat
320- Fixed hidden sector handling in mformat
321- Minfo generates mformat command lines containing new -T option
322- Mlabel prints error if label too long
323* Sun Feb 28 2010 Alain Knaff <alain@knaff.lu>
324- Merged Debian patches
325* Tue Nov 03 2009 Alain Knaff <alain@knaff.lu>
326- Mingw compatibility fixes