From e52f5be258af99c111f1637c86f8a551b32f3e8f5ac14e3e07d88aff4329752b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 30 Jan 2007 14:22:03 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dosfstools?expand=0&rev=2 --- dosfstools-2.11-buffer.patch | 7 ++-- dosfstools-2.11-o_excl.patch | 20 +++++++++ ...subfs.patch => dosfstools-2.11-subfs.patch | 4 +- ...d.patch => dosfstools-2.11-unaligned.patch | 5 +-- dosfstools.changes | 5 +++ dosfstools.spec | 42 +++++++++---------- 6 files changed, 51 insertions(+), 32 deletions(-) create mode 100644 dosfstools-2.11-o_excl.patch rename dosfstools-subfs.patch => dosfstools-2.11-subfs.patch (83%) rename unaligned.patch => dosfstools-2.11-unaligned.patch (79%) diff --git a/dosfstools-2.11-buffer.patch b/dosfstools-2.11-buffer.patch index 1eb2378..e0a51bd 100644 --- a/dosfstools-2.11-buffer.patch +++ b/dosfstools-2.11-buffer.patch @@ -1,7 +1,6 @@ -diff -pur dosfstools-2.11-3/mkdosfs/mkdosfs.c dosfstools-2.11/mkdosfs/mkdosfs.c ---- dosfstools-2.11-3/mkdosfs/mkdosfs.c 2005-11-03 08:26:13.112421613 -0800 -+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2005-11-07 07:14:47.288053612 -0800 -@@ -809,7 +809,7 @@ setup_tables (void) +--- mkdosfs/mkdosfs.c ++++ mkdosfs/mkdosfs.c +@@ -809,7 +809,7 @@ /* On Atari, the first few bytes of the boot sector are assigned * differently: The jump code is only 2 bytes (and m68k machine code * :-), then 6 bytes filler (ignored), then 3 byte serial number. */ diff --git a/dosfstools-2.11-o_excl.patch b/dosfstools-2.11-o_excl.patch new file mode 100644 index 0000000..4219b86 --- /dev/null +++ b/dosfstools-2.11-o_excl.patch @@ -0,0 +1,20 @@ +--- mkdosfs/mkdosfs.c ++++ mkdosfs/mkdosfs.c +@@ -1673,7 +1673,7 @@ + + if (!create) { + check_mount (device_name); /* Is the device already mounted? */ +- dev = open (device_name, O_RDWR); /* Is it a suitable device to build the FS on? */ ++ dev = open (device_name, O_EXCL|O_RDWR); /* Is it a suitable device to build the FS on? */ + if (dev < 0) + die ("unable to open %s"); + } +@@ -1681,7 +1681,7 @@ + off_t offset = blocks*BLOCK_SIZE - 1; + char null = 0; + /* create the file */ +- dev = open( device_name, O_RDWR|O_CREAT|O_TRUNC, 0666 ); ++ dev = open( device_name, O_EXCL|O_RDWR|O_CREAT|O_TRUNC, 0666 ); + if (dev < 0) + die("unable to create %s"); + /* seek to the intended end-1, and write one byte. this creates a diff --git a/dosfstools-subfs.patch b/dosfstools-2.11-subfs.patch similarity index 83% rename from dosfstools-subfs.patch rename to dosfstools-2.11-subfs.patch index 38dbc4a..698e770 100644 --- a/dosfstools-subfs.patch +++ b/dosfstools-2.11-subfs.patch @@ -1,5 +1,5 @@ ---- mkdosfs/mkdosfs.c.orig 2003-06-14 22:07:08.000000000 +0200 -+++ mkdosfs/mkdosfs.c 2005-02-15 16:02:35.175598263 +0100 +--- mkdosfs/mkdosfs.c ++++ mkdosfs/mkdosfs.c @@ -592,11 +592,15 @@ FILE *f; struct mntent *mnt; diff --git a/unaligned.patch b/dosfstools-2.11-unaligned.patch similarity index 79% rename from unaligned.patch rename to dosfstools-2.11-unaligned.patch index 02f89af..7cc49bf 100644 --- a/unaligned.patch +++ b/dosfstools-2.11-unaligned.patch @@ -1,6 +1,5 @@ -diff -rup dosfstools-2.10/dosfsck/boot.c dosfstools-2.10.2/dosfsck/boot.c ---- dosfstools-2.10/dosfsck/boot.c 2004-06-17 21:18:01.289544641 +0200 -+++ dosfstools-2.10.2/dosfsck/boot.c 2004-06-17 21:19:12.176001322 +0200 +--- dosfsck/boot.c ++++ dosfsck/boot.c @@ -8,6 +8,7 @@ #include #include diff --git a/dosfstools.changes b/dosfstools.changes index 6e78869..290036f 100644 --- a/dosfstools.changes +++ b/dosfstools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 30 14:04:38 CET 2007 - prusnak@suse.cz + +- mkdosfs now opens device with O_EXCL [#238687] + ------------------------------------------------------------------- Sat May 27 19:15:11 CEST 2006 - schwab@suse.de diff --git a/dosfstools.spec b/dosfstools.spec index 1ba6513..31d38d5 100644 --- a/dosfstools.spec +++ b/dosfstools.spec @@ -1,7 +1,7 @@ # # spec file for package dosfstools (Version 2.11) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -12,22 +12,19 @@ Name: dosfstools Provides: mkdosfs dosfsck -License: GPL +License: GNU General Public License (GPL) Group: System/Filesystems Autoreqprov: on Summary: Utilities for Making and Checking MS-DOS FAT File Systems on Linux Version: 2.11 -Release: 15 +Release: 38 URL: ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools -Source: dosfstools-%{version}.src.tar.bz2 -#Patch0: dosfstools-%{version}-define.patch -#Patch1: dosfstools-%{version}-sign.patch -#Patch2: dosfstools-%{version}-manpage.patch -Patch3: dosfstools-%{version}-linuxfs.patch -Patch4: unaligned.patch -#Patch5: dosfsck-freedos.patch -Patch6: dosfstools-subfs.patch -Patch7: dosfstools-%{version}-buffer.patch +Source: %{name}-%{version}.src.tar.bz2 +Patch0: %{name}-%{version}-linuxfs.patch +Patch1: %{name}-%{version}-unaligned.patch +Patch2: %{name}-%{version}-subfs.patch +Patch3: %{name}-%{version}-buffer.patch +Patch4: %{name}-%{version}-o_excl.patch Obsoletes: mkdosfs dosfsck dosfstls BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -46,14 +43,11 @@ Authors: %prep %setup -#%patch0 -#%patch1 -#%patch2 +%patch0 +%patch1 +%patch2 %patch3 -%patch4 -p1 -#%patch5 -%patch6 -%patch7 -p1 +%patch4 %build make OPTFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $RPM_OPT_FLAGS" @@ -94,6 +88,8 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/*.gz %changelog -n dosfstools +* Tue Jan 30 2007 - prusnak@suse.cz +- mkdosfs now opens device with O_EXCL [#238687] * Sat May 27 2006 - schwab@suse.de - Don't strip binaries. * Wed Jan 25 2006 - mls@suse.de @@ -107,9 +103,9 @@ rm -rf $RPM_BUILD_ROOT - use sys/mount.h instead of linux/fs.h, this fixes compilation with current GCC * Tue Feb 15 2005 - mcihar@suse.cz - deal with subfs (bug #50838) -- use /proc/mounts if available for deciding whether device is + - use /proc/mounts if available for deciding whether device is mounted or not -- just issue warning if it is mounted as subfs + - just issue warning if it is mounted as subfs * Thu Aug 19 2004 - mcihar@suse.cz - merged some dosfsck fixes from FreeDOS * Thu Jul 15 2004 - schwab@suse.de @@ -130,9 +126,9 @@ rm -rf $RPM_BUILD_ROOT - install links also for {fsck,mkfs}.vfat + man pages (bug #32284) * Mon Sep 29 2003 - mcihar@suse.cz - updated to 2.10: -- dosfsck: various 64-bit fixes and removed some warnings by Michal + - dosfsck: various 64-bit fixes and removed some warnings by Michal Cihar -- mkdosfs: better error message if called without parameters (also + - mkdosfs: better error message if called without parameters (also suggested by Michal) * Mon Jun 09 2003 - mcihar@suse.cz - new upstream version 2.9: