[ 
http://jira.codehaus.org/browse/MOJO-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=180482#action_180482
 ] 

Brett Okken edited comment on MOJO-1308 at 6/16/09 11:24 AM:
-------------------------------------------------------------

What if we just added a new attribute to Source called softlinkDestination?

                        <mapping>
                            <directory>/usr/myapp/bin</directory>
                            <directoryIncluded>false</directoryIncluded>
                            <username>root</username>
                            <groupname>root</groupname>
                            <filemode>555</filemode>
                            <sources>
                                <source>
                                    <location>src/main/bin/httpd</location>
                                    
<softlinkDestination>/etc/init.d</softlinkDestination>
                                </source>
                            </sources>
                        </mapping>


Then, under %install, we softlink from softlink destination to every file 
identified by the source.

      was (Author: kantiger):
    What if we just added a new attribute to Source called softlinkDestination?

                        <mapping>
                            <directory>/usr/myapp/bin</directory>
                            <directoryIncluded>false</directoryIncluded>
                            <username>root</username>
                            <groupname>root</groupname>
                            <filemode>555</filemode>
                            <sources>
                                <source>
                                    <location>src/main/bin/httpd</location>
                                    
<softlinkDestination>/etc/init.d</softlinkDestination>
                                </source>
                            </sources>
                        </mapping>


Then, under %install, we softlink from softlink destination to every file 
identified by the source.
I believe that the %files info would already be present.
  
> Support for softlinks
> ---------------------
>
>                 Key: MOJO-1308
>                 URL: http://jira.codehaus.org/browse/MOJO-1308
>             Project: Mojo
>          Issue Type: New Feature
>          Components: rpm
>            Reporter: Are Gravbrøt
>            Priority: Minor
>
> In many cases it is necessary to add softlinks in the rpm complete software 
> installation. 
> Today that can be accomplished by adding scripts containing ln -s statements.
> However, there is a significant drawback in doing it this way, since the 
> %files section of the SPEC file is not updated to reflect this.
> This leads to creating files that are not reported by rpm -ql.
> To remedy this, I suggest adding a feature to enable the addition of 
> softlinks in the configuration section.
> Ex. 
> <softlinkmapping><target>/sometarget</target><source>/somesource</source></softlinkmapping>
> The spec file can be updated in the following way:
> %install
> ln -s /somesource $RPM_BUILD/sometarget
> %files
> /sometarget

-- 
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