Issue Type: Bug Bug
Affects Versions: 2.1-alpha-1
Assignee: Unassigned
Components: rpm
Created: 05/Jun/12 12:35 PM
Description:

When an attempt is made to create a single softlink in a directory, this works and a symbolic link is created:

<mapping>
              <directory>/usr/share/${tomcat.base}-${tomcat.instance}</directory>
              <filemode>750</filemode>
              <username>root</username>
              <groupname>${tomcat.group}</groupname>
              <sources>
                <softlinkSource>
                  <location>/var/cache/${tomcat.base}-${tomcat.instance}</location>
                  <destination>work</destination>
                </softlinkSource>
              </sources>
            </mapping>

As soon as an attempt is made to create two symbolic links in the same directory, no symbolic links appear at all, but the build silently succeeds:

<mapping>
              <directory>/usr/share/${tomcat.base}-${tomcat.instance}</directory>
              <filemode>750</filemode>
              <username>root</username>
              <groupname>${tomcat.group}</groupname>
              <sources>
                <softlinkSource>
                  <location>/var/cache/${tomcat.base}-${tomcat.instance}</location>
                  <destination>work</destination>
                </softlinkSource>
              </sources>
            </mapping>
            <mapping>
              <directory>/usr/share/${tomcat.base}-${tomcat.instance}</directory>
              <filemode>750</filemode>
              <username>root</username>
              <groupname>${tomcat.group}</groupname>
              <sources>
                <softlinkSource>
                  <location>/var/tmp/${tomcat.base}-${tomcat.instance}</location>
                  <destination>temp</destination>
                </softlinkSource>
              </sources>
            </mapping>

According to the source at http://mojo.codehaus.org/rpm-maven-plugin/xref/org/codehaus/mojo/rpm/SpecWriter.html there is some bizarre plugin behaviour - for reasons unclear the spec file is rendered differently depending on whether one link is present, or multiple links are present. It looks like the "single link" case works, while the "multiple links" case is broken.

The rendered spec file has no "ln" statements present at all:

%install
if [ -e $RPM_BUILD_ROOT ];
then
  mv /home/gatekeeper/minfrin/src/code/trunk/platform/platform-tomcat7/platform-tomcat7-template/target/rpm/platform-tomcat7-template/tmp-buildroot/* $RPM_BUILD_ROOT
else
  mv /home/gatekeeper/minfrin/src/code/trunk/platform/platform-tomcat7/platform-tomcat7-template/target/rpm/platform-tomcat7-template/tmp-buildroot $RPM_BUILD_ROOT
fi


%files

%dir %attr(750,root,tomcat) /etc/tomcat7-template
%dir %attr(750,tomcat,tomcat) /var/log/tomcat7-template
%dir %attr(750,tomcat,tomcat) /var/cache/tomcat7-template
%dir %attr(750,tomcat,tomcat) /var/tmp/tomcat7-template
%dir %attr(750,root,tomcat) /usr/share/tomcat7-template
%attr(750,root,tomcat) /usr/share/tomcat7-template
%attr(750,root,tomcat) /usr/share/tomcat7-template
Environment: java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
Project: Mojo RPM Plugin
Priority: Major Major
Reporter: Graham Leggett
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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