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