restore ld.so.conf.d to workaround mock issue (rhbz#2166028)

This commit is contained in:
Jens Petersen 2023-02-11 00:03:14 +08:00
parent 1c6ff01623
commit 6ad54b8225

View File

@ -586,15 +586,10 @@ sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynl
%endif
%endif
%if %{defined _ghcdynlibdir}
%if "%_ghcdynlibdir" != "%_libdir"
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_ghcdynlibdir}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
%endif
%else
# https://bugzilla.redhat.com/show_bug.cgi?id=2166028
%if "%{?_ghcdynlibdir}" != "%_libdir"
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{ghclibplatform}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
echo "%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
%endif
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
chrpath -d $i
@ -815,9 +810,10 @@ make test
%if %{defined ghclibdir}
%if "%{?_ghcdynlibdir}" != "%_libdir"
%post base -p /sbin/ldconfig
%postun base -p /sbin/ldconfig
%endif
%transfiletriggerin compiler -- %{ghcliblib}/package.conf.d
%ghc_pkg_recache