File ntfs-3g.spec of Package NTFS-3g

#
# spec file for package ntfs-3g (Version 1.2531)
#
# Copyright (c) 2008 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.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           ntfs-3g
Summary:        Linux NTFS-3G userspace filesystem with full write support
Version:        1.2712
Release:        1
Provides:       ntfsprogs-fuse  = 1.13.1
Obsoletes:      ntfsprogs-fuse <= 1.13.1
License:        GPL v2 or later
Group:          System/Filesystems
Source:         %{name}-%{version}.tar.lzma
Source1:        buildall.sh
Patch0:         ntfs-3g-warnings.patch
Patch2:         ntfs-3g-utf8-fallback.patch
%define use_permission_branch 0
#Patch3:         ntfs-3g-permssions.patch
Url:            http://www.ntfs-3g.org
BuildRequires:  lzma ntfsprogs
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1010
Supplements:    filesystem(ntfs-3g)
%endif
%define _exec_prefix /
%define _libdir      /%_lib

%description
NTFS-3G allows for read/write access to NTFS partitions which can be
shared with Windows XP, Windows Server 2003, Windows 2000 and Windows
Vista.

Limitations:

* No support for journaling. As a result, if the journal is dirty,
   NTFS-3g has to refuse read-write mounts.

* No support for reading/writing compressed and encrypted files

* Only static permissions, set at mount time

Notes:

* Implemented in user space though fuse. It is possible to balance
   performance using normal processor and I/O priorities of the
   ntfs-3g processes.

* NTFS-3g can detect if the filesystem to be mounted has been in use
   by Windows when it hibernated and refuses read-write mount to
   prevent data corruption as a result of Windows resuming with a
   changed filesystem underneath.

Evaluating access permissions and file ownership is handled like in the
Linux FAT and other free Linux NTFS drivers: The access rights for all
files on the mounted partition can be set when mounting the filesystem
and are the same for all files. Requests to change access rights are
silently ignored.

Thru the ntfs-3g web site, a version of ntfs-3g with permission
handling (which should be useable but is not released officially) can
be found.

Compared to vanilla ntfs-3g, this version changes the default locale
fallback (when no working locale is defined) from hiding and rejecting
all non-ASCII path names to displaying and expecting UTF-8 encoding in
path names.



Authors:
--------
    Szabolcs Szakacsits

%prep
lzma -dc %{SOURCE0} | tar x --recursive-unlink -f -
%setup -q -D -T
%patch
%patch2
%if %use_permission_branch
#patch3 -p1
%endif

%build
#
# regarding -Wno-sign-compare - checked with the Szaka: There is one variable
# which is signed and would possibly ok to be unsigned. Any solution to this
# needs to be carefully reviewed and tested, so we do not change the code now:
#
CFLAGS="$RPM_OPT_FLAGS -Wformat -Wformat-security -W -Wno-sign-compare -Werror" \
%configure --disable-static --disable-ldconfig || grep -B 30 error: config.log
make %{?jobs:-j%jobs}

%install
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%check
echo >test.fs
/usr/sbin/mkntfs -q -F test.fs 3000
src/ntfs-3g.probe --readonly  test.fs
src/ntfs-3g.probe --readwrite test.fs
rm test.fs

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog CREDITS NEWS README
/sbin/mount.ntfs-3g
/bin/ntfs-3g.probe
/%_lib/libntfs-3g.so.*
%{_bindir}/ntfs-3g
%{_mandir}/man8/*
%exclude /%_lib/libntfs-3g.??
%exclude /%_lib/pkgconfig
%exclude %_includedir
%exclude /usr/share/doc/ntfs-3g/README

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
* Thu Jun 05 2008 bk@suse.de
- Update to 1.2531 to fix fs crashes and fs hangs with corrupt NTFS:
  - A corrupted directory could hang the filesystem driver itself.
  - The driver could hang or misbehave when compressed, sparse or
  encrypted file attribute flags were corrupted.
  - The driver could crash when both an MFT attribute offset and
  the allocated bytes were corrupted.
  - Mount could hang if the block allocation map was corrupted.
* Tue May 06 2008 bk@suse.de
- Update to STABLE Version 1.2506 (May 6, 2008):
  - Fix NTFS volume corruption in extremely specific circumstances
  - Fix symlink(2) for size 256 if the old path was over 255 bytes
  - Unprivileged mount fixes: supplementary groups dropped too early
  and make unprivileged mount if /etc/fuse.conf wasn't in shape.
  - No longer pass 'noatime' additionally and unconditionally to mount
- Obsolete ntfsprogs-fuse (to be dropped from ntfsprogs package)
- With ntfsprogs and lzma, this builds in all non-debian repros
* Wed Mar 19 2008 bk@suse.de
- Update to 1.2310:
  - Fix: CHKDSK reported inconsistencies as data and allocation size
  of some special purpose resident unnamed $DATA attribute in the
  index and inode FILE_NAME attributes could be incorrect.
  - Fix: unprivileged mount failed if user had rights for everything
  except the FUSE device file.
  - Fix: the 'dev' and 'suid' mount options weren't useable before
  - Change from ENOTEMPTY to EEXIST on rmdir of non-empty directories
* Mon Mar 03 2008 bk@suse.de
- Add a fix for a crash of the driver with a specific long filename
- Fix support for -odev and -osuid when mounting using /bin/ntfs-3g
* Thu Feb 28 2008 bk@suse.de
- Workaround for build issue with gcc-4.3 (bnc#354113) is obsolete
- Improve treatment of warnings and integrate -Wformat-security
* Mon Feb 18 2008 bk@suse.de
- Update to 1.2216:
  - adds ntfs3-g.probe to check if filesystem is in mountable state
  - fixes "Operation not supported" when deleting huge directories
  - uses specialized integrated libfuse with fixes for suid usage
- Add a temporary workaround to prevent miscompilation with gcc-4.3
- Add a simple functionality check using ntfs-3g.probe to %%check
- Added -Wextra -Werror and fixed the resulting compiler errors
* Wed Sep 26 2007 bk@suse.de
- When called as mount.ntfs-3g and rw mount is not possible because
  the volume is dirty or hibernated, fall back to read-only mounnt
  to allow installation and system boot to succeed (fixes #309074)
* Thu Sep 13 2007 bk@suse.de
- Update to version 1.913
  - Fix too rigid hibernation check which unneccesarily refused mount
  - Free disk space calculation was highly CPU intensive during writes.
  This could reduce write performance severely, especially for huge
  volumes if a file manager or desktop applet regularly polled for
  disk space usage. Change code to O(1), takes ~10ms on a typical
  desktop, and it's now completely independent of the volume size.
  The changes noted below were tested in public release candidate:
  - Significant performance improvement for writing many files,
  typically by 50-1000%% (cp, tar, compile, directory syncronisation)
  - improved the performance of writing multi-GB size files, particulary
  after the creation of many thousands of other files. Previous disk
  space defragmentation is highly adviced for the best possible speed.
  File level defragmentation is not enough.
  - improved concurrent write performance.
* Mon Aug 27 2007 bk@suse.de
- Update to version 1.826:
  * fix: utime() also updated the timestamp of the parent directory
  * fix: ignore the "volume dirty" bit because its real meaning is
  "check the volume". The fact of the real dirtiness is stored in
  the NTFS logfile which is already checked for.
  * new: --disable-library option links libntfs-3g into ntfs-3g
* Fri Aug 10 2007 bk@suse.de
- Update to version 1.810:
  fix: file rename changed the modification time of some files which
  prevented tools like rsync from preserving the timestamp
  fix: unmount (fusermount -u) was denied for an unprivileged user
  who was allowed to mount a block device.
  fix: the driver could hang if there wasn't enough memory during
  reading a large directory
  fix: reading a directory may reporte success when there was an error
  fix: metadata update error was ignored in some very rare cases during
  writing a file
  fix: permissions checking was turned on if umask, fmask and dmask
  was set to the default 000 value.
  change: manual update, added Windows filename compatibility section
  change: lots of logging improvements
* Thu Jul 26 2007 coolo@suse.de
- let yast install the package for ntfs-3g filesystems
* Fri Jul 13 2007 bk@suse.de
- Update to version 1.710:
  change: more troubleshooting hints if a volume can't be mounted
  change: logging improvements
  fix: move, rename and hard link could return "input/output error"
  fix: very rare, recoverable directory corruption
- Do not obsolete ntfsprogs-fuse and do not provide mount.ntfs
  Can coexist with ntfsmount and kernel ntfs module now, but you
  have to use "ntfs-3g" as filesystem type in fstab and mount -t,
  as done in the examples on http://www.ntfs-3g.org/index.html#usage
* Tue Jul 03 2007 bk@suse.de
- Update to version 1.616:
  new: ensure mount works during boot: move binaries to the rootfs
  fix: any kind of file size change failure returned "Operation not permitted"
  fix: a file close failure was not always reported
  fix: an unmount failure was not always reported
  fix: if the $MFT Bitmap wasn't up-to-date file creation always gave "Input/output error"
  fix: converting very long file names to Unicode may have failed
  fix: syslog messages didn't show the low level error detail
* Wed Jun 06 2007 bk@suse.de
- Initial version 1.516, has Obsoletes: ntfsmount-fuse
openSUSE Build Service is sponsored by