Unix & Linux Asked by user3450148 on December 23, 2020
This should be watching ice melt simple, but it is not. I’m on Fedora 33 and creating an RPM for the Diamond text editor. I’ve got the Debian stuff all done and works great. Diamond uses the CopperSpice library which does not currently have any RPM or Debian packages. Not a problem as the development build puts the needed libraries in the same directory as the executable. As a work around when creating these packages I took the old fashioned approach of building a tree under /opt/diamond. Super simple and works great. You can even tell the build process to install to /opt/diamond and all is well.
I have now burned two days on tracking this down. The infuriating part is that it only gags on 3 of the libraries. No matter where I put libCsXcbSupport1.7.so that one seems to be found.
[sudo] password for roland:
Last metadata expiration check: 0:29:24 ago on Mon 30 Nov 2020 06:01:12 PM CST.
Error:
Problem: conflicting requests
- nothing provides libCsCore1.7.so()(64bit) needed by diamond-2.0-1.x86_64
- nothing provides libCsGui1.7.so()(64bit) needed by diamond-2.0-1.x86_64
- nothing provides libCsNetwork1.7.so()(64bit) needed by diamond-2.0-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages)
[roland@localhost share]$ sudo yum install diamond-2.0-1.x86_64.rpm --skip-broken
Last metadata expiration check: 0:29:57 ago on Mon 30 Nov 2020 06:01:12 PM CST.
Dependencies resolved.
Problem: conflicting requests
- nothing provides libCsCore1.7.so()(64bit) needed by diamond-2.0-1.x86_64
- nothing provides libCsGui1.7.so()(64bit) needed by diamond-2.0-1.x86_64
- nothing provides libCsNetwork1.7.so()(64bit) needed by diamond-2.0-1.x86_64
================================================================================
Package Architecture Version Repository Size
================================================================================
Skipping packages with broken dependencies:
diamond x86_64 2.0-1 @commandline 23 M
Transaction Summary
================================================================================
Skip 1 Package
Nothing to do.
Complete!
[roland@localhost share]$ rpm -qp diamond-2.0-1.x86_64.rpm --provides
diamond = 2.0-1
diamond(x86-64) = 2.0-1
libCsCore1.7.so
libCsGui1.7.so
libCsNetwork1.7.so
libCsXcbSupport1.7.so
[roland@localhost share]$
I have tried putting the full paths. I have tried just spaces between names. I have tried adding multiple Provides: tags so each had their own line. I have even had the SPEC file move the required libraries to /usr/lib/cs_lib/lib64. No matter what the same 3 libraries cannot be found.
There has to be something rather obvious I’m overlooking.
Name: @PACKAGE@
Version: @RPM_VERSION@
Release: @RPM_RELEASE@
Summary: Diamond text editor
License: GPL V2
Group: Applications/Editors
URL: https://www.copperspice.com/documentation-diamond.html
Vendor: @CPACK_PACKAGE_VENDOR@
Packager: Roland Hughes <[email protected]>
Provides: libCsXcbSupport1.7.so, libCsCore1.7.so, libCsGui1.7.so, libCsNetwork1.7.so
%description
@DIAMOND_DESCRIPTION@
%prep
# Cleanup any left over build files
#
rm -rf *
# Populate the build directory
#
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%{buildroot}/opt/diamond" -DCMAKE_PREFIX_PATH=/usr/lib/cs_lib/lib64/cmake/CopperSpice "@CMAKE_SOURCE_DIR@"
%build
ninja
%install
rm -rf %{buildroot}/opt/diamond
mkdir -p %{buildroot}/opt/diamond
mkdir -p %{buildroot}/usr/lib/cs_lib/lib64
ninja install
#cp %{buildroot}/opt/diamond/libCsCore1.7.so %{buildroot}/usr/lib/cs_lib/lib64
#cp %{buildroot}/opt/diamond/libCsGui1.7.so %{buildroot}/usr/lib/cs_lib/lib64
#cp %{buildroot}/opt/diamond/libCsNetwork1.7.so %{buildroot}/usr/lib/cs_lib/lib64
#cp %{buildroot}/opt/diamond/libCsXcbSupport1.7.so %{buildroot}/usr/lib/cs_lib/lib64
#rm %{buildroot}/opt/diamond/libCsCore1.7.so
#rm %{buildroot}/opt/diamond/libCsGui1.7.so
#rm %{buildroot}/opt/diamond/libCsNetwork1.7.so
#rm %{buildroot}/opt/diamond/libCsXcbSupport1.7.so
%files
#/usr/lib/cs_lib/lib64/libCsCore1.7.so
#/usr/lib/cs_lib/lib64/libCsGui1.7.so
#/usr/lib/cs_lib/lib64/libCsNetwork1.7.so
#/usr/lib/cs_lib/lib64/libCsXcbSupport1.7.so
/opt/diamond/diamond
/opt/diamond/diamond.desktop
/opt/diamond/diamond.png
/opt/diamond/libCsCore1.7.so
/opt/diamond/libCsGui1.7.so
/opt/diamond/libCsNetwork1.7.so
/opt/diamond/libCsXcbSupport1.7.so
/opt/diamond/dictionary/de_DE.dic
/opt/diamond/dictionary/de_DE.aff
/opt/diamond/dictionary/de_DE_frami.aff
/opt/diamond/dictionary/de_DE_frami.dic
/opt/diamond/dictionary/en_US.aff
/opt/diamond/dictionary/en_US.dic
/opt/diamond/dictionary/es.aff
/opt/diamond/dictionary/es.dic
/opt/diamond/dictionary/fr.aff
/opt/diamond/dictionary/fr.dic
/opt/diamond/dictionary/it_IT.aff
/opt/diamond/dictionary/it_IT.dic
/opt/diamond/dictionary/pt.aff
/opt/diamond/dictionary/pt_BR.aff
/opt/diamond/dictionary/pt_BR.dic
/opt/diamond/dictionary/pt.dic
/opt/diamond/dictionary/userDict.txt
/opt/diamond/platforms/CsGuiXcb1.7.so
/opt/diamond/syntax/syn_clipper.json
/opt/diamond/syntax/syn_cmake.json
/opt/diamond/syntax/syn_cpp.json
/opt/diamond/syntax/syn_css.json
/opt/diamond/syntax/syn_doxy.json
/opt/diamond/syntax/syn_errlog.json
/opt/diamond/syntax/syn_html.json
/opt/diamond/syntax/syn_java.json
/opt/diamond/syntax/syn_js.json
/opt/diamond/syntax/syn_json.json
/opt/diamond/syntax/syn_make.json
/opt/diamond/syntax/syn_none.json
/opt/diamond/syntax/syn_nsi.json
/opt/diamond/syntax/syn_php.json
/opt/diamond/syntax/syn_pl.json
/opt/diamond/syntax/syn_py.json
/opt/diamond/syntax/syn_sh.json
/opt/diamond/syntax/syn_txt.json
/opt/diamond/syntax/syn_xml.json
/opt/diamond/printerdrivers/CsPrinterDriverCups1.7.so
%post
echo "called post install script section"
if [ $1 == 1] ; then
echo "we are in install"
ln -s /opt/diamond/diamond /usr/local/bin
cp /opt/diamond/diamond.desktop /usr/share/applications
fi
%postun
if [ $1 == 1 ] ; then
# upgrading
rm /usr/local/bin/diamond
else if [ $1 == 0 ] ; then
# removing
rm /usr/local/bin/diamond
rm /usr/share/applications/diamond.desktop
fi
fi
%changelog
# let's skip this for now
Appreciate any insight.
Given the avalanche of responses, I guess I have to post my own answer. This is what actually worked.
=======
Name: @PACKAGE@
Version: @RPM_VERSION@
Release: @RPM_RELEASE@
Summary: Diamond text editor
License: GPL V2
Group: Applications/Editors
URL: https://www.copperspice.com/documentation-diamond.html
Vendor: @CPACK_PACKAGE_VENDOR@
Packager: Roland Hughes <[email protected]>
Provides: libCsCore1.7.so()(64bit), libCsGui1.7.so()(64bit), libCsNetwork1.7.so()(64bit)
%description
@DIAMOND_DESCRIPTION@
%prep
# Cleanup any left over build files
#
rm -rf *
# Populate the build directory
#
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%{buildroot}/opt/diamond" -DCMAKE_PREFIX_PATH=/usr/lib/cs_lib/lib64/cmake/CopperSpice "@CMAKE_SOURCE_DIR@"
%build
ninja
%install
rm -rf %{buildroot}/opt/diamond
mkdir -p %{buildroot}/opt/diamond
mkdir -p %{buildroot}/usr/lib64/cs_lib/lib64
ninja install
%files
/opt/diamond/diamond
/opt/diamond/diamond.desktop
/opt/diamond/diamond.png
/opt/diamond/libCsCore1.7.so
/opt/diamond/libCsGui1.7.so
/opt/diamond/libCsNetwork1.7.so
/opt/diamond/libCsXcbSupport1.7.so
/opt/diamond/dictionary/de_DE.dic
/opt/diamond/dictionary/de_DE.aff
/opt/diamond/dictionary/de_DE_frami.aff
/opt/diamond/dictionary/de_DE_frami.dic
/opt/diamond/dictionary/en_US.aff
/opt/diamond/dictionary/en_US.dic
/opt/diamond/dictionary/es.aff
/opt/diamond/dictionary/es.dic
/opt/diamond/dictionary/fr.aff
/opt/diamond/dictionary/fr.dic
/opt/diamond/dictionary/it_IT.aff
/opt/diamond/dictionary/it_IT.dic
/opt/diamond/dictionary/pt.aff
/opt/diamond/dictionary/pt_BR.aff
/opt/diamond/dictionary/pt_BR.dic
/opt/diamond/dictionary/pt.dic
/opt/diamond/dictionary/userDict.txt
/opt/diamond/platforms/CsGuiXcb1.7.so
/opt/diamond/syntax/syn_clipper.json
/opt/diamond/syntax/syn_cmake.json
/opt/diamond/syntax/syn_cpp.json
/opt/diamond/syntax/syn_css.json
/opt/diamond/syntax/syn_doxy.json
/opt/diamond/syntax/syn_errlog.json
/opt/diamond/syntax/syn_html.json
/opt/diamond/syntax/syn_java.json
/opt/diamond/syntax/syn_js.json
/opt/diamond/syntax/syn_json.json
/opt/diamond/syntax/syn_make.json
/opt/diamond/syntax/syn_none.json
/opt/diamond/syntax/syn_nsi.json
/opt/diamond/syntax/syn_php.json
/opt/diamond/syntax/syn_pl.json
/opt/diamond/syntax/syn_py.json
/opt/diamond/syntax/syn_sh.json
/opt/diamond/syntax/syn_txt.json
/opt/diamond/syntax/syn_xml.json
/opt/diamond/printerdrivers/CsPrinterDriverCups1.7.so
%post
# no matter install or upgrade, create and copy
#
ln -s /opt/diamond/diamond /usr/local/bin
cp /opt/diamond/diamond.desktop /usr/share/applications
%postun
# No difference between upgrade and uninstall for these
#
rm /usr/local/bin/diamond
rm /usr/share/applications/diamond.desktop
if [ $1 -gt 0 ] ; then
# removing - need to completely remove the directory
rm -rf /opt/diamond
fi
%changelog
# let's skip this for now
=======
Believe it or not the Provides line had to be listed exactly like this:
Provides: libCsCore1.7.so()(64bit), libCsGui1.7.so()(64bit), libCsNetwork1.7.so()(64bit)
Correct answer by user3450148 on December 23, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP