openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
133 stars 185 forks source link

[mkbaselibs] creates 0-byte files instead of sym links #912

Open e4t opened 1 year ago

e4t commented 1 year ago

It has been discovered that mkbaselibs creates empty files (0-byte) where symlinks are expected at least for %{ghost}ed files. This comes into play when creating 32-bit compatibility packages for packages that use update alternatives:

$  rpm -qlvp liblapacke3-32bit-3.9.0-5.4.x86_64.rpm 
drwxr-xr-x    2 root     root                        0 Aug 31 14:19 /usr/lib/lapack
lrwxrwxrwx    1 root     root                       19 Aug 31 14:19 /usr/lib/lapack/liblapacke.so.3 -> liblapacke.so.3.9.0
-rwxr-xr-x    1 root     root                  2262368 Aug 31 14:19 /usr/lib/lapack/liblapacke.so.3.9.0
-rw-r--r--    1 root     root                        0 Aug 31 14:19 /usr/lib/liblapacke.so.3

for lapack in OBS:science. The corresponding %files section reads:

%files -n liblapacke3
%{_libdir}/lapack/liblapacke.so.%{version}
%{_libdir}/lapack/liblapacke.so.3
%ghost %{_libdir}/liblapacke.so.3
%ghost %{_sysconfdir}/alternatives/liblapacke.so.3_%{_arch}

Also check the discussion around this bugzilla entry as well as this ticket around the release tools.