Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude directory in rpm mapping in pom file?

I have a pom file that creates an RPM artifact, and the RPM installs /tmp/some_script.sh into /etc/init.d/some_script.

It does indeed accomplish this, but it also tries to install /etc/init.d before it installs /etc/init.d/some_script. In other words, if I run:

rpm -qlp my_rpm.rpm

I get:

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

How can I force it not to install /etc/init.d?


Here's the relevant configuration:

<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>
like image 506
Chris F Avatar asked Jun 25 '13 18:06

Chris F


1 Answers

According to 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>
like image 146
Chris F Avatar answered Oct 20 '22 02:10

Chris F