9

我有一个创建 RPM 工件的 pom 文件,并且 RPM 安装/tmp/some_script.sh/etc/init.d/some_script.

它确实做到了这一点,但它也会在安装/etc/init.d之前尝试安装/etc/init.d/some_script。换句话说,如果我运行:

rpm -qlp my_rpm.rpm

我得到:

/etc/init.d
/etc/init.d/some_script
.....

我怎样才能强制它不安装/etc/init.d


下面是相关配置:

<mapping>
    <directory>/etc/init.d</directory>
    <username>root</username>
    <groupname>root</groupname>
    <sources>
        <source>
            <location>/tmp/some_script.sh</location>
            <destination>some_script</destination>
        </source>
    </sources>
</mapping>
4

1 回答 1

16

根据rpm-maven-plugin

<mapping>
    <directory>/etc/init.d</directory>
    <!-- Set this to false -->
    <directoryIncluded>false</directoryIncluded>
    <username>root</username>
    <groupname>root</groupname>
    <sources>
        <source>
            <location>/tmp/some_script.sh</location>
            <destination>some_script</destination>
        </source>
    </sources>
</mapping>
于 2013-06-25T18:53:13.210 回答