[db4] install everything in /usr
Harald Hoyer
harald at fedoraproject.org
Wed Jan 25 13:07:31 UTC 2012
commit d1afc96cc46ed01bd05c0e46f65273e141a333bd
Author: Harald Hoyer <harald at redhat.com>
Date: Wed Jan 25 14:06:29 2012 +0100
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.
db4.spec | 26 ++++++--------------------
1 files changed, 6 insertions(+), 20 deletions(-)
---
diff --git a/db4.spec b/db4.spec
index 69c86cc..be9096a 100644
--- a/db4.spec
+++ b/db4.spec
@@ -5,7 +5,7 @@
Summary: The Berkeley DB database library (version 4) for C
Name: db4
Version: 4.8.30
-Release: 5%{?dist}
+Release: 6%{?dist}
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
# db-1.85 upstream patches
@@ -22,6 +22,7 @@ License: BSD
Group: System Environment/Libraries
# unversioned obsoletes are OK here as these BDB versions never occur again
Obsoletes: db1, db2, db3
+#Conflicts: filesystem < 3
BuildRequires: perl, libtool, ed, util-linux-ng
BuildRequires: tcl-devel >= 8.5.2-3
%ifarch %{java_arches}
@@ -243,24 +244,6 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libdb_tcl.so
chmod +x ${RPM_BUILD_ROOT}%{_libdir}/*.so*
-# Move the main shared library from /usr/lib* to /lib* directory.
-if [ "%{_libdir}" != "/%{_lib}" ]; then
- mkdir -p $RPM_BUILD_ROOT/%{_lib}/
- mv $RPM_BUILD_ROOT/%{_libdir}/libdb-%{__soversion}.so $RPM_BUILD_ROOT/%{_lib}/
-
-# Leave relative symlinks in %{_libdir}.
- touch $RPM_BUILD_ROOT/rootfile
- root=..
- while [ ! -e $RPM_BUILD_ROOT/%{_libdir}/${root}/rootfile ] ; do
- root=${root}/..
- done
- rm $RPM_BUILD_ROOT/rootfile
-
- ln -sf ${root}/%{_lib}/libdb-%{__soversion}.so $RPM_BUILD_ROOT/%{_libdir}/libdb.so
- ln -sf ${root}/%{_lib}/libdb-%{__soversion}.so $RPM_BUILD_ROOT/%{_libdir}/
- ln -sf libdb_cxx-%{__soversion}.so $RPM_BUILD_ROOT/%{_libdir}/libdb_cxx.so
-fi
-
# Move the header files to a subdirectory, in case we're deploying on a
# system with multiple versions of DB installed.
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/db4
@@ -311,7 +294,6 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root)
%doc LICENSE README
-/%{_lib}/libdb-%{__soversion}.so
%{_libdir}/libdb-%{__soversion}.so
%files cxx
@@ -370,6 +352,10 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
+* Wed Jan 25 2012 Harald Hoyer <harald at redhat.com> 4.8.30-6
+- install everything in /usr
+ https://fedoraproject.org/wiki/Features/UsrMove
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.8.30-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list