2016-12-01 9 views
1

rpmのインストール中に/ usr/share/man/man8にインストールしたいmanファイルがあります。これが私のマッピングです。rpm-maven-plugin v2.1.5ファイルを自動的にgzipしています

<mapping> 
    <directory>/usr/share/man/man8</directory> 
    <documentation>true</documentation> <!-- no difference if I add or remove this --> 
    <filemode>644</filemode> 
    <username>root</username> 
    <groupname>root</groupname> 
    <directoryIncluded>false</directoryIncluded> 
    <recurseDirectories>false</recurseDirectories> 
    <sources> 
    <source> 
     <location>${project.build.directory}</location> 
     <includes> 
     <include>mymanpage.8</include> 
     </includes> 
    </source> 
    </sources> 
</mapping> 

RPM-mavenの-プラグインエラーとmymanpage.8が見つからないと言われます。 mymanpage.8が対象ディレクトリにあることを確認しました。次に、プラグインがmymanpage.8.gzターゲット/ rpm/rpmtest/buildroot/usr/share/man/man8ディレクトリにコピーされていることに気付きました。だから私はプラグインが何とかこのmanページをgzipしてそれを行うことができると認識していると仮定していますが、マッピングは特にmymanpage.8を含んでいるので、それを見つけることができないと嘆いています。私はインクルードをmymanpage.8 *に変更しようとしましたが、それでも同じファイルにエラーが見つかりません。

誰もこれまで見たことがありますか?修正は何ですか?

私はmymanpage.8ファイルをインストールディレクトリにコピーし、postinstallスクリプトレットで/ usr/share/man/man8に移動するという回避策があると思います。

答えて

0

rpm-maven-pluginは、作業をrpmbuildコマンドに委任します。 これはあなたのマニュアルページを圧縮します。

locationタグを使用して、ディレクトリだけでなくファイルも指定できます。

<mapping> 
    <directory>/usr/share/man/man8</directory> 
    <filemode>644</filemode> 
    <username>root</username> 
    <groupname>root</groupname> 
    <directoryIncluded>false</directoryIncluded> 
    <recurseDirectories>false</recurseDirectories> 
    <sources> 
    <source> 
     <location>${project.build.directory}/mymanpage.8</location> 
    </source> 
    </sources> 
</mapping> 

includeを使用する場合は、ワイルドカードパターンを使用する必要があります。

documentationタグは、マンページのためのものではなく、他のドキュメントの変更履歴などのためのものです。 rpm-maven-plugin documentationを参照してください。

0

マニュアルページがパッケージより後の段階でビルドされるという問題があります。 rpmプラグインがmanページをパッケージ化しようとしているとき、まだそこにはありません。あなたはここでの生活サイクルを見つけることができます。

https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

のようにパッケージの相が、例えば、リソースを生成する前に必ずmanページが作成されていることを確認し、ビルドディレクトリに終わります。

関連する問題