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.
This commit is contained in:
parent
6f5c76ffc4
commit
7c5cd28f3c
26
libdb.spec
26
libdb.spec
@ -4,7 +4,7 @@
|
||||
Summary: The Berkeley DB database library for C
|
||||
Name: libdb
|
||||
Version: 5.2.36
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?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
|
||||
@ -26,6 +26,7 @@ BuildRequires: java-1.6.0-openjdk-devel
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: dos2unix
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
#Conflicts: filesystem < 3
|
||||
|
||||
%description
|
||||
The Berkeley Database (Berkeley DB) is a programmatic toolkit that
|
||||
@ -228,24 +229,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}/%{name}
|
||||
@ -307,7 +290,6 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README
|
||||
/%{_lib}/libdb-%{__soversion}.so
|
||||
%{_libdir}/libdb-%{__soversion}.so
|
||||
|
||||
%files utils
|
||||
@ -371,6 +353,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_datadir}/java/*.jar
|
||||
|
||||
%changelog
|
||||
* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 5.2.36-3
|
||||
- install everything in /usr
|
||||
https://fedoraproject.org/wiki/Features/UsrMove
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.36-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user