From 3553039064b6b66d4a2e95c95d3723953b9875aa81fa101a9e0f05264d73e9e4 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 1 Nov 2010 12:27:32 +0000 Subject: [PATCH 1/3] - fixed: * [bnc#639553] -- mkdosfs now detects md raid partition correctly * [bnc#649046] -- install dosfslabel * spec file cleanup OBS-URL: https://build.opensuse.org/package/show/Base:System/dosfstools?expand=0&rev=13 --- dosfstools-mdraid-partition.patch | 19 +++++++++++++++++++ dosfstools-suse-dirs.patch | 17 +++++++++++++++++ dosfstools.changes | 8 ++++++++ dosfstools.spec | 27 +++++---------------------- 4 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 dosfstools-mdraid-partition.patch create mode 100644 dosfstools-suse-dirs.patch 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 From 67b430223ff2209886e6bdb9fb631c0df83b1e855aad3f8f4db8ca1082208e28 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 9 Nov 2010 14:48:52 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/Base:System/dosfstools?expand=0&rev=14 --- dosfstools-mdraid-partition.patch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dosfstools-mdraid-partition.patch b/dosfstools-mdraid-partition.patch index e1462f8..b2a4ec5 100644 --- a/dosfstools-mdraid-partition.patch +++ b/dosfstools-mdraid-partition.patch @@ -1,8 +1,8 @@ Index: src/mkdosfs.c =================================================================== ---- src.orig/mkdosfs.c +--- src/mkdosfs.c.orig +++ src/mkdosfs.c -@@ -1763,10 +1763,10 @@ main (int argc, char **argv) +@@ -1763,10 +1763,11 @@ main (int argc, char **argv) * this is a MO disk I introduce a -I (ignore) switch. -Joey */ if (!ignore_full_disk && ( @@ -10,10 +10,11 @@ Index: src/mkdosfs.c - (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 */ ++ (statbuf.st_rdev & 0xfff3f) == 0x00300 || ++ (major(statbuf.st_rdev) == 3 && (minor(statbuf.st_rdev) & 63) == 0) || /* hda, hdb */ ++ (major(statbuf.st_rdev) == 8 && (minor(statbuf.st_rdev) & 15) == 0) || /* sd */ ++ (major(statbuf.st_rdev) == 13 && (minor(statbuf.st_rdev) & 63) == 0) || /* xd */ ++ (major(statbuf.st_rdev) == 22 && (minor(statbuf.st_rdev) & 63) == 0)) /* hdc, hdd */ ) die ("Device partition expected, not making filesystem on entire device '%s' (use -I to override)"); From 93f653c819555f0835302d664f9ccf1cce35e5a6e8fd96f5a25263243cbab448 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 9 Nov 2010 14:59:54 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/Base:System/dosfstools?expand=0&rev=15 --- dosfstools-mdraid-partition.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dosfstools-mdraid-partition.patch b/dosfstools-mdraid-partition.patch index b2a4ec5..c3bbca5 100644 --- a/dosfstools-mdraid-partition.patch +++ b/dosfstools-mdraid-partition.patch @@ -11,10 +11,10 @@ Index: src/mkdosfs.c - (statbuf.st_rdev & 0xff3f) == 0x0d00 || /* xd */ - (statbuf.st_rdev & 0xff3f) == 0x1600 ) /* hdc, hdd */ + (statbuf.st_rdev & 0xfff3f) == 0x00300 || -+ (major(statbuf.st_rdev) == 3 && (minor(statbuf.st_rdev) & 63) == 0) || /* hda, hdb */ -+ (major(statbuf.st_rdev) == 8 && (minor(statbuf.st_rdev) & 15) == 0) || /* sd */ -+ (major(statbuf.st_rdev) == 13 && (minor(statbuf.st_rdev) & 63) == 0) || /* xd */ -+ (major(statbuf.st_rdev) == 22 && (minor(statbuf.st_rdev) & 63) == 0)) /* hdc, hdd */ ++ (major(statbuf.st_rdev) == 3 && (minor(statbuf.st_rdev) % 64) == 0) || /* hda, hdb */ ++ (major(statbuf.st_rdev) == 8 && (minor(statbuf.st_rdev) % 16) == 0) || /* sd */ ++ (major(statbuf.st_rdev) == 13 && (minor(statbuf.st_rdev) % 64) == 0) || /* xd */ ++ (major(statbuf.st_rdev) == 22 && (minor(statbuf.st_rdev) % 64) == 0)) /* hdc, hdd */ ) die ("Device partition expected, not making filesystem on entire device '%s' (use -I to override)");