[ 
http://jira.codehaus.org/browse/MOJO-931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jh updated MOJO-931:
--------------------

    Attachment: rpm-single-sourcefile.patch

I went ahead checked out the code and added the possibility to create mappings 
based on one file. This makes it possible to quickly add one-file mappings and 
will result in file based lines in the rpm spec.

<mapping>
    <directory>/etc/init.d</directory>
    <configuration>true</configuration>
    <username>root</username>
    <groupname>root</groupname>
    <sourceFile>${project.build.directory}/mystartupscript</sourceFile>
</mapping>

generates:

%config %dir %attr(-,root,root) /etc/init.d/mystartupscript

I bypassed the sources property because this seemed an easier way. Another 
option was to add something like a handlePerFile property to generate one line 
per file in the spec, but this means duplicating the DirectoryArchiver 
functionality.

Please advise if this patch/solution is not to your liking. 

> Specifying <directory> of a pre-exising system directory results in an RPM 
> which can't be installed due to conflicts
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: MOJO-931
>                 URL: http://jira.codehaus.org/browse/MOJO-931
>             Project: Mojo
>          Issue Type: Bug
>          Components: rpm
>         Environment: CentOS release 5 (Final)
>            Reporter: Shmulik Fishman
>            Priority: Minor
>         Attachments: rpm-single-sourcefile.patch
>
>
> <mapping> currently specifies the destination directory for the files. This 
> directory is always listed as part of the installed files.
> This presents a problem when trying to install a startup script for the 
> application:
> <mapping>
>     <directory>/etc/init.d</directory>
> [...]
> </mapping>
> Trying to install the RPM results in the following error:
> # rpm -Uvh dummy-1.0-1.i386.rpm
> file /etc/init.d from install of dummy-1.0-1 conflicts with file from package 
> chkconfig-1.3.30.1-1
> $ rpm -qlvp dummy-1.0-1.i386.rpm 
> [..]
> drwxr-xr-x    2 root    root                0 Oct 17 10:50 /etc/init.d
> -rwxr-xr-x    1 root    root            15060 Oct 17 10:50 /etc/init.d/dummy
> [..]
> Current workarounds:
> - Use the postinstall script to create the file in /etc/init.d, removing this 
> <mapping> altogether.
> or
> - Use --force during the installation

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to