1

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 <roland@logikalsolutions.com>
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.

2
  • I'm not an expert on RPM construction, but I do note that, for example, your package is listed as providing (based on your rpm -q --provides output) libCsCore1.7.so, but the requires listing says it wants libCsCore1.7.so()(64bit). Do the libraries have to be actually built in a directory called "lib64" to be detected as 64-bit? – patbarron Dec 1 '20 at 5:16
  • I have no idea. I was hoping there was some form of Requires: -libCsCore1.7.so() to remove the library from the list of requirements. It runs just fine with everything installed in /opt/diamond. The problem here is the auto-magic Requires logic of RPM. – user3450148 Dec 1 '20 at 12:28
1

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 <roland@logikalsolutions.com>
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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.