From ba8184c5e82de2230d17750b44c4036673a7b792 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Tue, 3 May 2005 13:39:55 +0000 Subject: [PATCH] Include endian and gcc4 fixes. --- udftools-1.0.0b3-mkudffs-bigendian.patch | 36 +++++++++++++ ...=> udftools-1.0.0b3-pktsetup-chardev.patch | 0 udftools-1.0.0b3-wrudf-gcc4.patch | 53 +++++++++++++++++++ udftools.spec | 15 +++--- 4 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 udftools-1.0.0b3-mkudffs-bigendian.patch rename udftools-1.0.0b3.patch => udftools-1.0.0b3-pktsetup-chardev.patch (100%) create mode 100644 udftools-1.0.0b3-wrudf-gcc4.patch diff --git a/udftools-1.0.0b3-mkudffs-bigendian.patch b/udftools-1.0.0b3-mkudffs-bigendian.patch new file mode 100644 index 0000000..3209262 --- /dev/null +++ b/udftools-1.0.0b3-mkudffs-bigendian.patch @@ -0,0 +1,36 @@ +Date: Sun, 12 Dec 2004 14:25:09 +0100 +From: Christoph Hellwig +To: submit@bugs.debian.org + +Package: udftools +Version: 1.0.0b3-6 + +mkduffs crashes with a segmentation fault when trying to create a +filesystem on big-endian systems. e.g. mkudffs /dev/sda4 on my +PowerMac. + +udffstools from CVS on sf.net is fine, and I've extracted the actual +fix: + + +diff -uNr -Xdontdiff -p udftools-1.0.0b3/mkudffs/mkudffs.c udftools/mkudffs/mkudffs.c +--- udftools-1.0.0b3/mkudffs/mkudffs.c 2004-02-23 04:35:33.000000000 +0100 ++++ udftools/mkudffs/mkudffs.c 2004-03-02 03:09:39.000000000 +0100 +@@ -250,14 +250,14 @@ void split_space(struct udf_disc *disc) + if (size % offsets[PSPACE_SIZE]) + size -= (size % offsets[PSPACE_SIZE]); + set_extent(disc, PSPACE, start, size); +- for (i=0; iudf_lvd[0]->numPartitionMaps; i++) ++ for (i=0; iudf_lvd[0]->numPartitionMaps); i++) + { + if (i == 1) + disc->udf_lvid->freeSpaceTable[i] = cpu_to_le32(0xFFFFFFFF); + else + disc->udf_lvid->freeSpaceTable[i] = cpu_to_le32(size); + } +- for (j=0; judf_lvd[0]->numPartitionMaps; j++) ++ for (j=0; judf_lvd[0]->numPartitionMaps); j++) + { + if (j == 1) + disc->udf_lvid->sizeTable[i+j] = cpu_to_le32(0xFFFFFFFF); + diff --git a/udftools-1.0.0b3.patch b/udftools-1.0.0b3-pktsetup-chardev.patch similarity index 100% rename from udftools-1.0.0b3.patch rename to udftools-1.0.0b3-pktsetup-chardev.patch diff --git a/udftools-1.0.0b3-wrudf-gcc4.patch b/udftools-1.0.0b3-wrudf-gcc4.patch new file mode 100644 index 0000000..1369012 --- /dev/null +++ b/udftools-1.0.0b3-wrudf-gcc4.patch @@ -0,0 +1,53 @@ +Subject: Bug#288621: udftools: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment +From: Andreas Jochens +Message-Id: +Date: Tue, 04 Jan 2005 19:29:01 +0100 +Lines: 59 + +Package: udftools +Severity: normal +Tags: patch + +When building 'udftools' on amd64 with gcc-4.0, +I get the following error: + +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness +wrudf.c:248: error: invalid lvalue in assignment +make[2]: *** [wrudf.o] Error 1 +make[2]: Leaving directory `/udftools-1.0.0b3/wrudf' + +With the attached patch 'udftools' can be compiled +on amd64 using gcc-4.0. + +The patch also changes the Build-Depends from 'libreadline4-dev' +to 'libreadline5-dev'. + +Regards +Andreas Jochens + +diff -urN ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c ./wrudf/wrudf.c +--- ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c 2002-11-26 08:18:51.000000000 +0100 ++++ ./wrudf/wrudf.c 2005-01-04 16:56:49.394078200 +0100 +@@ -245,7 +245,7 @@ + } else if( strncmp( spm->partIdent.ident, UDF_ID_VIRTUAL, strlen(UDF_ID_VIRTUAL)) == 0 ) + virtualPartitionNum = i; + } +- (char*)spm += spm->partitionMapLength; ++ spm = (char*)spm + spm->partitionMapLength; + } + + if( medium == CDR ) { +diff -urN ../tmp-orig/udftools-1.0.0b3/debian/control ./debian/control diff --git a/udftools.spec b/udftools.spec index 04d703b..87d3186 100644 --- a/udftools.spec +++ b/udftools.spec @@ -1,13 +1,14 @@ Summary: Linux UDF Filesystem userspace utilities Name: udftools Version: 1.0.0b3 -Release: 2 - +Release: 3 License: GPL Group: Applications/Archiving URL: http://sourceforge.net/projects/linux-udf/ Source: http://dl.sf.net/linux-udf/udftools-%{version}.tar.gz -Patch: udftools-1.0.0b3.patch +Patch0: udftools-1.0.0b3-pktsetup-chardev.patch +Patch1: udftools-1.0.0b3-mkudffs-bigendian.patch +Patch2: udftools-1.0.0b3-wrudf-gcc4.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: readline-devel @@ -17,7 +18,9 @@ Linux UDF Filesystem userspace utilities. %prep %setup -%patch -p1 +%patch0 -p1 -b .pktsetup-chardev +%patch1 -p1 -b .mkudffs-bigendian +%patch2 -p1 -b .wrudf-gcc4 %build @@ -44,8 +47,8 @@ Linux UDF Filesystem userspace utilities. %changelog -* Fri Apr 7 2005 Michael Schwendt -- rebuilt +* Tue May 3 2005 Matthias Saou 1.0.0b3-3 +- Include patches to fix big endian issue and gcc4 compile. * Mon Feb 7 2005 Matthias Saou 1.0.0b3-1 - Initial RPM release, based on spec file from John Treacy.