Moved unversioned *.so shared libraries back to *-devel package.

Moved unversioned *.so plugins to %{_libdir}/unixODBC subdirectory
accroding to packaging guidelines:

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages

Resolves: #1877720
This commit is contained in:
Ondrej Dubaj 2020-10-12 16:34:17 +02:00
parent 7ee5ec63ec
commit c328593ac3

View File

@ -74,6 +74,14 @@ cp %{SOURCE5} README.dist
# remove obsolete Postgres drivers from the package (but not the setup code)
rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so*
# make directory for unversioned plugins and create appropriate symlinks
mkdir $RPM_BUILD_ROOT%{_libdir}/%{name}
cd $RPM_BUILD_ROOT%{_libdir}/%{name}
ln -s ../libodbcpsqlS.so.2.0.0 libodbcpsqlS.so
ln -s ../libodbcmyS.so.2.0.0 libodbcmyS.so
ln -s ../libtdsS.so.2.0.0 libtdsS.so
cd -
# copy text driver documentation into main doc directory
# currently disabled because upstream no longer includes text driver
# mkdir -p doc/Drivers/txt
@ -95,9 +103,10 @@ find $RPM_BUILD_ROOT%{_libdir} -name "*.so.*" | sed "s|^$RPM_BUILD_ROOT||" > bas
find $RPM_BUILD_ROOT%{_libdir} -name "*.so" | sed "s|^$RPM_BUILD_ROOT||" > devel-so-list
# move these to main package, they're often dlopened...
for lib in libodbc.so libodbcinst.so libodbcpsqlS.so libodbcmyS.so libtdsS.so
for lib in libodbcpsqlS.so libodbcmyS.so libtdsS.so
do
echo "%{_libdir}/$lib" >> base-so-list
echo "%{_libdir}/%{name}/$lib" >> base-so-list
rm -f $RPM_BUILD_ROOT%{_libdir}/$lib
grep -v "/$lib$" devel-so-list > devel-so-list.x
mv -f devel-so-list.x devel-so-list
done
@ -123,6 +132,7 @@ done
%changelog
* Thu Sep 10 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.3.9-1
- rebase to version 2.3.9
- move unversioned *.so files back to *-devel package
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild