Fedora 33 RPM パッケージには独自のライブラリが用意されているため、インストールできず、「コンテンツは提供されません」というメッセージが表示されます。

Fedora 33 RPM パッケージには独自のライブラリが用意されているため、インストールできず、「コンテンツは提供されません」というメッセージが表示されます。

氷が溶けるのを見るのは簡単なはずですが、そうではありません。私はFedora 33を使用しており、Diamondテキストエディタ用のRPMを作成しています。私はDebianに関するすべてのことを見つけました。 Diamondは現在RPMやDebianパッケージを持たないCopperSpiceライブラリを使用しています。開発バージョンでは、必要なライブラリを実行可能ファイルと同じディレクトリに配置するため、これは問題ではありません。これらのパッケージを作成するときは、回避策として/opt/diamondの下にツリーを作成する古い方法を使用しました。とても簡単で素敵に動作します。 /opt/diamondにインストールするようにビルドプロセスに指示することもできます。続行できます。

私はこの問題を追跡するために2日間を過ごしました。怒りながら、ライブラリのうち3つだけが制限されています。 libCsXcbSupport1.7.soをどこに置いても見つかるようです。

[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]$

フルパスを入力してみました。名前の間にスペースを追加してみました。各タグに独自の行があるように、複数のProvide:タグを追加してみました。 SPECファイルで必要なライブラリを/usr/lib/cs_lib/lib64に移動することもありました。とにかく同じ3つのライブラリが見つかりません。

私が見落としているかなり明白な何かがあるでしょう。

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

どんな洞察力にも感謝します。

答え1

答えが多すぎるので、自分で答えを投稿する必要があると思いました。これが実際に機能するものです。

=======

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

=======

信じられないか、提供ラインがリストされなければなりません。正確にこのように:

Provides:   libCsCore1.7.so()(64bit), libCsGui1.7.so()(64bit), libCsNetwork1.7.so()(64bit)

関連情報