diff --git a/dosfstools-mdraid-partition.patch b/dosfstools-mdraid-partition.patch new file mode 100644 index 0000000..e1462f8 --- /dev/null +++ b/dosfstools-mdraid-partition.patch @@ -0,0 +1,19 @@ +Index: src/mkdosfs.c +=================================================================== +--- src.orig/mkdosfs.c ++++ src/mkdosfs.c +@@ -1763,10 +1763,10 @@ main (int argc, char **argv) + * this is a MO disk I introduce a -I (ignore) switch. -Joey + */ + if (!ignore_full_disk && ( +- (statbuf.st_rdev & 0xff3f) == 0x0300 || /* hda, hdb */ +- (statbuf.st_rdev & 0xff0f) == 0x0800 || /* sd */ +- (statbuf.st_rdev & 0xff3f) == 0x0d00 || /* xd */ +- (statbuf.st_rdev & 0xff3f) == 0x1600 ) /* hdc, hdd */ ++ (statbuf.st_rdev & 0xfff3f) == 0x00300 || /* hda, hdb */ ++ (statbuf.st_rdev & 0xfff0f) == 0x00800 || /* sd */ ++ (statbuf.st_rdev & 0xfff3f) == 0x00d00 || /* xd */ ++ (statbuf.st_rdev & 0xfff3f) == 0x01600 ) /* hdc, hdd */ + ) + die ("Device partition expected, not making filesystem on entire device '%s' (use -I to override)"); + diff --git a/dosfstools-suse-dirs.patch b/dosfstools-suse-dirs.patch new file mode 100644 index 0000000..3d86e06 --- /dev/null +++ b/dosfstools-suse-dirs.patch @@ -0,0 +1,17 @@ +Index: dosfstools-3.0.10/Makefile +=================================================================== +--- dosfstools-3.0.10.orig/Makefile ++++ dosfstools-3.0.10/Makefile +@@ -19,9 +19,9 @@ + # can be found in /usr/share/common-licenses/GPL-3 file. + + DESTDIR = +-PREFIX = /usr/local +-SBINDIR = $(PREFIX)/sbin +-DOCDIR = $(PREFIX)/share/doc ++PREFIX = /usr ++SBINDIR = /sbin ++DOCDIR = $(PREFIX)/share/doc/packages + MANDIR = $(PREFIX)/share/man + + #OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 diff --git a/dosfstools.changes b/dosfstools.changes index b3054de..d79ec1c 100644 --- a/dosfstools.changes +++ b/dosfstools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Nov 1 12:15:33 CET 2010 - pgajdos@suse.cz + +- fixed: + * [bnc#639553] -- mkdosfs now detects md raid partition correctly + * [bnc#649046] -- install dosfslabel + * spec file cleanup + ------------------------------------------------------------------- Mon Sep 13 11:31:10 CEST 2010 - pgajdos@suse.cz diff --git a/dosfstools.spec b/dosfstools.spec index bfa506b..a9e87e3 100644 --- a/dosfstools.spec +++ b/dosfstools.spec @@ -28,6 +28,8 @@ Version: 3.0.10 Release: 1 Url: http://freshmeat.net/projects/dosfstools Source: %{name}_%{version}.orig.tar.bz2 +Patch0: %{name}-suse-dirs.patch +Patch1: %{name}-mdraid-partition.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Supplements: filesystem(vfat) @@ -46,33 +48,14 @@ Authors: %prep %setup +%patch0 -p1 +%patch1 %build make OPTFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $RPM_OPT_FLAGS" %install -# directories -install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man8} -# binaries -install -m755 mkdosfs $RPM_BUILD_ROOT/sbin/ -install -m755 dosfsck $RPM_BUILD_ROOT/sbin/ -# alternative names -ln -sf mkdosfs $RPM_BUILD_ROOT/sbin/mkfs.msdos -ln -sf dosfsck $RPM_BUILD_ROOT/sbin/fsck.msdos -ln -sf mkdosfs $RPM_BUILD_ROOT/sbin/mkfs.vfat -ln -sf dosfsck $RPM_BUILD_ROOT/sbin/fsck.vfat -# man pages -install -m 644 man/mkdosfs.8 $RPM_BUILD_ROOT%{_mandir}/man8/ -install -m 644 man/dosfsck.8 $RPM_BUILD_ROOT%{_mandir}/man8/ -install -m 644 man/dosfslabel.8 $RPM_BUILD_ROOT%{_mandir}/man8/ -# man pages for alternative names -ln -sf mkdosfs.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.msdos.8.gz -ln -sf dosfsck.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/fsck.msdos.8.gz -ln -sf mkdosfs.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.vfat.8.gz -ln -sf dosfsck.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/fsck.vfat.8.gz -# documentation -install -d $RPM_BUILD_ROOT/%{_docdir}/%{name}/ -install -m644 ChangeLog COPYING doc/* $RPM_BUILD_ROOT/%{_docdir}/%{name}/ +%makeinstall %clean rm -rf $RPM_BUILD_ROOT