summaryrefslogtreecommitdiff
path: root/extra/dosfstools
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-01-03 00:38:37 -0800
committerroot <root@rshg054.dnsready.net>2013-01-03 00:38:37 -0800
commitf2bbb5646aefe9ea6502524fbf4d0138cee8b2a1 (patch)
treef8dcab5e1ac3d149a39377f3437d9d3f812e62f9 /extra/dosfstools
parentfa3e18ade0ab762a414c45ec433025d96b71254b (diff)
Thu Jan 3 00:38:37 PST 2013
Diffstat (limited to 'extra/dosfstools')
-rw-r--r--extra/dosfstools/PKGBUILD12
-rw-r--r--extra/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch25
2 files changed, 33 insertions, 4 deletions
diff --git a/extra/dosfstools/PKGBUILD b/extra/dosfstools/PKGBUILD
index 764b471d0..fbe672432 100644
--- a/extra/dosfstools/PKGBUILD
+++ b/extra/dosfstools/PKGBUILD
@@ -1,20 +1,23 @@
-# $Id: PKGBUILD 173425 2012-12-19 14:56:38Z tpowa $
+# $Id: PKGBUILD 174137 2013-01-02 14:44:16Z tpowa $
# Maintainer: dorphell <dorphell@archlinux.org>
# Committer: Judd Vinet <jvinet@zeroflux.org>
pkgname=dosfstools
pkgver=3.0.13
-pkgrel=1
+pkgrel=2
pkgdesc="DOS filesystem utilities"
arch=(i686 x86_64)
depends=('glibc')
#source=(http://www.daniel-baumann.ch/software/dosfstools/$pkgname-$pkgver.tar.xz)
# using debian source, main page is down since quite some time
-source=(http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_3.0.13.orig.tar.xz)
+source=(http://ftp.de.debian.org/debian/pool/main/d/dosfstools/dosfstools_3.0.13.orig.tar.xz
+ dosfstools-3.0.12-fix-alloc-rootdir-entry.patch)
url="http://www.daniel-baumann.ch/software/dosfstools/"
license=('GPL2')
build() {
cd $srcdir/$pkgname-$pkgver
+ # fix https://bugs.archlinux.org/task/33248
+ patch -Np1 -i ${srcdir}/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch
make
}
@@ -22,4 +25,5 @@ package () {
cd $srcdir/$pkgname-$pkgver
make PREFIX=$pkgdir MANDIR=$pkgdir/usr/share/man DOCDIR=$pkgdir/usr/share/doc install
}
-md5sums=('c1d851e3fc065a935c7cf919545d239f')
+md5sums=('c1d851e3fc065a935c7cf919545d239f'
+ 'c2be6f2cd1d47297b2d6a8ba237e04eb')
diff --git a/extra/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch b/extra/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch
new file mode 100644
index 000000000..44e6e86b5
--- /dev/null
+++ b/extra/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch
@@ -0,0 +1,25 @@
+--- dosfstools-3.0.12/src/check.c.old 2010-01-23 10:13:17.000000000 +0100
++++ dosfstools-3.0.12/src/check.c 2011-01-31 17:43:31.462674941 +0100
+@@ -174,7 +174,10 @@
+ offset = fs->root_start + next_free * sizeof(DIR_ENT);
+ memset(de, 0, sizeof(DIR_ENT));
+ while (1) {
+- sprintf((char *)de->name, pattern, curr_num);
++ char expanded[12];
++ sprintf(expanded, pattern, curr_num);
++ memcpy(de->name, expanded, 8);
++ memcpy(de->ext, expanded + 8, 3);
+ for (scan = 0; scan < fs->root_entries; scan++)
+ if (scan != next_free &&
+ !strncmp((const char *)root[scan].name,
+--- dosfstools-3.0.12/src/fat.c
++++ dosfstools-3.0.12/src/fat.c
+@@ -474,7 +474,7 @@ void reclaim_file(DOS_FS * fs)
+ DIR_ENT de;
+ loff_t offset;
+ files++;
+- offset = alloc_rootdir_entry(fs, &de, "FSCK%04d");
++ offset = alloc_rootdir_entry(fs, &de, "FSCK%04dREC");
+ de.start = CT_LE_W(i & 0xffff);
+ if (fs->fat_bits == 32)
+ de.starthi = CT_LE_W(i >> 16);