install everything in /usr

This patch is needed for the /usr-move feature
https://fedoraproject.org/wiki/Features/UsrMove

This package requires now 'filesystem' >= 3, which is only installable
on a system which has /bin, /sbin, /lib, /lib64 as symlinks to /usr and
not regular directories. The 'filesystem' package acts as a guard, to
prevent *this* package to be installed on old unconverted systems.

New installations will have the 'filesystem' >=3 layout right away, old
installations need to be converted with anaconda or dracut first; only
after that, the 'filesystem' package, and also *this* package can be
installed.

Packages *should* not install files in /bin, /sbin, /lib, /lib64, but
only in the corresponding directories in /usr. Packages *must* not
install conflicting files with the same names in the corresponding
directories in / and /usr. Especially compatibilty symlinks must not be
installed.

Feel free to modify any of the changes to the spec file, but keep the
above in mind.
epel9
Kay Sievers 13 years ago
parent 218250e71f
commit 816b7971c4

@ -8,7 +8,7 @@
Name: ntfs-3g Name: ntfs-3g
Summary: Linux NTFS userspace driver Summary: Linux NTFS userspace driver
Version: 2011.10.9 Version: 2011.10.9
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz
@ -77,28 +77,24 @@ CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
--with-fuse=external \ --with-fuse=external \
%endif %endif
--exec-prefix=/ \ --exec-prefix=/ \
--bindir=/bin \
--sbindir=/sbin \
--enable-crypto \ --enable-crypto \
--enable-extras \ --enable-extras
--libdir=/%{_lib}
make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool
%install %install
make LIBTOOL=%{_bindir}/libtool DESTDIR=%{buildroot} install make LIBTOOL=%{_bindir}/libtool DESTDIR=%{buildroot} install
rm -rf %{buildroot}/%{_lib}/*.la rm -rf %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}/%{_lib}/*.a rm -rf %{buildroot}%{_libdir}/*.a
# make the symlink an actual copy to avoid confusion rm -rf %{buildroot}/%{_sbindir}/mount.ntfs-3g
rm -rf %{buildroot}/sbin/mount.ntfs-3g cp -a %{buildroot}/%{_bindir}/ntfs-3g %{buildroot}/%{_sbindir}/mount.ntfs-3g
cp -a %{buildroot}/bin/ntfs-3g %{buildroot}/sbin/mount.ntfs-3g
# Actually make some symlinks for simplicity... # Actually make some symlinks for simplicity...
# ... since we're obsoleting ntfsprogs-fuse # ... since we're obsoleting ntfsprogs-fuse
pushd %{buildroot}/bin pushd %{buildroot}/%{_bindir}
ln -s ntfs-3g ntfsmount ln -s ntfs-3g ntfsmount
popd popd
pushd %{buildroot}/sbin pushd %{buildroot}/%{_sbindir}
ln -s mount.ntfs-3g mount.ntfs-fuse ln -s mount.ntfs-3g mount.ntfs-fuse
# And since there is no other package in Fedora that provides an ntfs # And since there is no other package in Fedora that provides an ntfs
# mount... # mount...
@ -106,17 +102,8 @@ ln -s mount.ntfs-3g mount.ntfs
# Need this for fsck to find it # Need this for fsck to find it
ln -s ../bin/ntfsck fsck.ntfs ln -s ../bin/ntfsck fsck.ntfs
popd popd
mv %{buildroot}/sbin/* %{buildroot}/%{_sbindir}
# Compat symlinks rmdir %{buildroot}/sbin
mkdir -p %{buildroot}%{_bindir}
pushd %{buildroot}%{_bindir}
ln -s /bin/ntfs-3g ntfs-3g
ln -s /bin/ntfsmount ntfsmount
popd
# Put the .pc file in the right place.
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
mv %{buildroot}/%{_lib}/pkgconfig/libntfs-3g.pc %{buildroot}%{_libdir}/pkgconfig/
# We get this on our own, thanks. # We get this on our own, thanks.
rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README
@ -129,19 +116,19 @@ cp -a %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/
%files %files
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README %doc AUTHORS ChangeLog COPYING CREDITS NEWS README
/sbin/mount.ntfs %{_sbindir}/mount.ntfs
%attr(754,root,root) /sbin/mount.ntfs-3g %attr(754,root,root) %{_sbindir}/mount.ntfs-3g
/sbin/mount.ntfs-fuse %{_sbindir}/mount.ntfs-fuse
/sbin/mount.lowntfs-3g %{_sbindir}/mount.lowntfs-3g
/bin/ntfs-3g
/bin/ntfsmount
/bin/ntfs-3g.probe
/bin/ntfs-3g.secaudit
/bin/ntfs-3g.usermap
/bin/lowntfs-3g
%{_bindir}/ntfs-3g %{_bindir}/ntfs-3g
%{_bindir}/ntfsmount %{_bindir}/ntfsmount
/%{_lib}/libntfs-3g.so.* %{_bindir}/ntfs-3g.probe
%{_bindir}/ntfs-3g.secaudit
%{_bindir}/ntfs-3g.usermap
%{_bindir}/lowntfs-3g
%{_bindir}/ntfs-3g
%{_bindir}/ntfsmount
%{_libdir}/libntfs-3g.so.*
%{_mandir}/man8/mount.lowntfs-3g.* %{_mandir}/man8/mount.lowntfs-3g.*
%{_mandir}/man8/mount.ntfs-3g.* %{_mandir}/man8/mount.ntfs-3g.*
%{_mandir}/man8/ntfs-3g* %{_mandir}/man8/ntfs-3g*
@ -149,38 +136,42 @@ cp -a %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/
%files devel %files devel
%{_includedir}/ntfs-3g/ %{_includedir}/ntfs-3g/
/%{_lib}/libntfs-3g.so %{_libdir}/libntfs-3g.so
%{_libdir}/pkgconfig/libntfs-3g.pc %{_libdir}/pkgconfig/libntfs-3g.pc
%files -n ntfsprogs %files -n ntfsprogs
%doc AUTHORS COPYING CREDITS ChangeLog NEWS README %doc AUTHORS COPYING CREDITS ChangeLog NEWS README
/bin/ntfscat %{_bindir}/ntfscat
/bin/ntfscluster %{_bindir}/ntfscluster
/bin/ntfscmp %{_bindir}/ntfscmp
/bin/ntfsfix %{_bindir}/ntfsfix
/bin/ntfsinfo %{_bindir}/ntfsinfo
/bin/ntfsls %{_bindir}/ntfsls
# Extras # Extras
/bin/ntfsck %{_bindir}/ntfsck
/bin/ntfsdecrypt %{_bindir}/ntfsdecrypt
/bin/ntfsdump_logfile %{_bindir}/ntfsdump_logfile
/bin/ntfsmftalloc %{_bindir}/ntfsmftalloc
/bin/ntfsmove %{_bindir}/ntfsmove
/bin/ntfstruncate %{_bindir}/ntfstruncate
/bin/ntfswipe %{_bindir}/ntfswipe
/sbin/fsck.ntfs %{_sbindir}/fsck.ntfs
/sbin/mkfs.ntfs %{_sbindir}/mkfs.ntfs
/sbin/mkntfs %{_sbindir}/mkntfs
/sbin/ntfsclone %{_sbindir}/ntfsclone
/sbin/ntfscp %{_sbindir}/ntfscp
/sbin/ntfslabel %{_sbindir}/ntfslabel
/sbin/ntfsresize %{_sbindir}/ntfsresize
/sbin/ntfsundelete %{_sbindir}/ntfsundelete
%{_mandir}/man8/mkntfs.8* %{_mandir}/man8/mkntfs.8*
%{_mandir}/man8/mkfs.ntfs.8* %{_mandir}/man8/mkfs.ntfs.8*
%{_mandir}/man8/ntfs[^m][^o]*.8* %{_mandir}/man8/ntfs[^m][^o]*.8*
%changelog %changelog
* Wed Feb 1 2012 Kay Sievers <kay@redhat.com> 2:2011.10.9-3
- install everything in /usr
https://fedoraproject.org/wiki/Features/UsrMove
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2011.10.9-2 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2011.10.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

Loading…
Cancel
Save