Fix installation on OSTree by removing %%ghost (rhbz#2193429)

Remove %%ldconfig_postun as it has no effect in Fedora
While installing this package on OSTree, a dangling symlink is created in the build_dir. Usually, the install-catalogue is expected to create the symlink to which the openjade.soc will be linked. However, it does not work in this scenario and since the file which is supposed to be made by install-catalogue is %%ghosted in the spec file, a dangling symlink is created. Then if this symlink is used to install other packages or read in the installation process, the installation process will fail.
The %%ghosted macro has been removed so that the file will be included in the build folder; however, additional fixes must be done. The %%ghosted file was removed by the install-catalogue in the %%preun, but the specfile removed the file again and threw a warning. Therefore I created the same but empty file to suppress this warning.
This commit is contained in:
Ondřej Sloup 2023-07-10 18:34:58 +02:00
parent 1e7304c808
commit 1f08b39535

View File

@ -1,7 +1,7 @@
Summary: A DSSSL implementation
Name: openjade
Version: 1.3.2
Release: 74%{?dist}
Release: 75%{?dist}
Requires: sgml-common
URL: http://openjade.sourceforge.net/
Source: http://download.sourceforge.net/openjade/openjade-%{version}.tar.gz
@ -93,19 +93,23 @@ export QA_RPATHS=0x0001
%post
%{?ldconfig}
/usr/bin/install-catalog --add /etc/sgml/%{name}-%{version}-%{release}.soc \
%{_bindir}/install-catalog --add %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \
%{_datadir}/sgml/%{name}-%{version}/catalog >/dev/null 2>/dev/null || :
%preun
/usr/bin/install-catalog --remove /etc/sgml/%{name}-%{version}-%{release}.soc \
%{_bindir}/install-catalog --remove %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \
%{_datadir}/sgml/%{name}-%{version}/catalog >/dev/null 2>/dev/null || :
%ldconfig_postun
# The install-catalog removes the file making uninstallation throw a warning about removing a non-existent file
# This file creation suppresses the warning (rhbz#2193429)
touch %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc
%files
%doc jadedoc/* dsssl/README.jadetex
%doc README COPYING VERSION
%ghost %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc
# Removed %%ghost for succesful instalation on OSTree (rhbz#2193429)
%{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc
%{_sysconfdir}/sgml/%{name}.soc
%{_bindir}/*
%{_libdir}/*.so.*
@ -113,6 +117,10 @@ export QA_RPATHS=0x0001
%{_datadir}/sgml/%{name}-%{version}
%changelog
* Mon Jul 10 2023 Ondrej Sloup <osloup@redhat.com> - 1.3.2-75
- Fix installation on OSTree by removing %%ghost (rhbz#2193429)
- Remove %%ldconfig_postun as it has no effect in Fedora
* Tue Jun 27 2023 Ondrej Sloup <osloup@redhat.com> - 1.3.2-74
- Use %%{buildroot} instead of $RPM_BUILD_ROOT as it is more recent
- Use directory macros and push/popd