[ 
http://jira.codehaus.org/browse/MRPM-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208316#action_208316
 ] 

Karl Heinz Marbaise commented on MRPM-60:
-----------------------------------------

So i have done the run with -X option to see what's happening...but i can't 
find prepare.sh file...
{code}
...
[DEBUG] Configuring mojo 'org.codehaus.mojo:rpm-maven-plugin:2.0-beta-4:rpm' -->
[DEBUG]   (f) artifact = ....tomcat:ci001:rpm:1.0.2-SNAPSHOT
[DEBUG]   (f) attachedArtifacts = []
[DEBUG]   (f) autoProvides = true
[DEBUG]   (f) autoRequires = true
[DEBUG]   (f) copyright = ....
[DEBUG]   (f) defaultGroupname = users
[DEBUG]   (f) defaultUsername = build
[DEBUG]   (f) defineStatements = [_unpackaged_files_terminate_build 0]
[DEBUG]   (f) description = Continous Integration Server 001
[DEBUG]   (f) distribution = Tomcat :: Continous Integration Server Nr.: 001
[DEBUG]   (f) group = TEST/Collectors
[DEBUG]   (s) scriptFile = /.../ci001/install.sh
[DEBUG]   (f) installScriptlet = 
Scriptlet[subpackage=null,program=null,script=null,scriptFile=/ci001/install.sh,fileEncoding=null]
[DEBUG]   (s) directory = /home/build
[DEBUG]   (s) filemode = 0755
[DEBUG]   (s) location = 
/..../ci001/../hudson/target/hudson-1.0.2-SNAPSHOT-bin.tar.gz
[DEBUG]   (s) targetArchitecture = x86_64
[DEBUG]   (s) sources = 
[{"/.../ci001/../hudson/target/hudson-1.0.2-SNAPSHOT-bin.tar.gz" targetArch: 
x86_64}]
[DEBUG]   (s) directory = /home/build
[DEBUG]   (s) filemode = 0755
[DEBUG]   (s) location = 
/.../ci001/../plugins/target/plugins-1.0.2-SNAPSHOT-bin.tar.gz
[DEBUG]   (s) targetArchitecture = x86_64
[DEBUG]   (s) sources = 
[{"/ci001/../plugins/target/plugins-1.0.2-SNAPSHOT-bin.tar.gz" targetArch: 
x86_64}]
[DEBUG]   (f) mappings = [["/home/build" {%attr(0755,-,-)} from 
[{"/../ci001/../hudson/target/hudson-1.0.2-SNAPSHOT-bin.tar.gz" targetArch: 
x86_64}]], ["/home/build" {%attr(0755,-,-)} from 
[{"/.../ci001/../plugins/target/plugins-1.0.2-SNAPSHOT-bin.tar.gz" targetArch: 
x86_64}]]]
[DEBUG]   (f) name = ci001
[DEBUG]   (f) needarch = x86_64
[DEBUG]   (f) packager = ....
[DEBUG]   (s) scriptFile = /.../ci001/postremove.sh
[DEBUG]   (s) fileEncoding = utf-8
[DEBUG]   (f) postremoveScriptlet = 
Scriptlet[subpackage=null,program=null,script=null,scriptFile=/.../ci001/postremove.sh,fileEncoding=utf-8]
[DEBUG]   (f) project = MavenProject: ....tomcat:ci001:1.0.2-SNAPSHOT @ 
/.../ci001/pom.xml
[DEBUG]   (f) projversion = 1.0.2-SNAPSHOT
[DEBUG]   (f) summary = Tomcat :: Continous Integration Server Nr.: 001
[DEBUG]   (f) url = ....
[DEBUG]   (f) vendor = ....
[DEBUG]   (f) workarea = /.../ci001/target/rpm
[DEBUG] -- end configuration --
[INFO] [rpm:rpm {execution: default-rpm}]
{code}

> prepareScriptlet in POM does not create %prep in spec file.
> -----------------------------------------------------------
>
>                 Key: MRPM-60
>                 URL: http://jira.codehaus.org/browse/MRPM-60
>             Project: Mojo RPM Plugin
>          Issue Type: Bug
>          Components: rpm
>    Affects Versions: 2.0-beta-4
>         Environment: Linux
>            Reporter: Karl Heinz Marbaise
>            Assignee: Brett Okken
>
> I have create a the following pom:
> {code:xml}
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>rpm-maven-plugin</artifactId>
>                 <version>2.0-beta-4</version>
>                 <extensions>true</extensions>
>                 <configuration>
>                     <needarch>x86_64</needarch>
>                     <copyright>....</copyright>
>                     <distribution>${project.name}</distribution>
>                     <group>TEST/Collectors</group>
>                     <packager>....</packager>
>                     <projversion>${project.version}</projversion>
>                     <release>${buildNumber}</release>
>                     <defineStatements>
>                        <defineStatement>_unpackaged_files_terminate_build 
> 0</defineStatement>
>                     </defineStatements>
>                     <defaultGroupname>users</defaultGroupname>
>                     <defaultUsername>build</defaultUsername>
>                     <defaultDirMode>2770</defaultDirMode>
>                     <defaultFileMode>2770</defaultFileMode>
>                     <prepareScriptlet>
>                         <scriptFile>prepare.sh</scriptFile>
>                         <fileEncoding>utf-8</fileEncoding>
>                     </prepareScriptlet>
>                     <postremoveScriptlet>
>                         <scriptFile>postremove.sh</scriptFile>
>                         <fileEncoding>utf-8</fileEncoding>
>                     </postremoveScriptlet>
>                     <installScriptlet>
>                         <scriptFile>install.sh</scriptFile>
>                     </installScriptlet>
>                     <postinstallScriplet>
>                         <scriptFile>postinstall.sh</scriptFile>
>                         <fileEncoding>utf-8</fileEncoding>
>                     </postinstallScriplet>
>                     <mappings>
>                         <mapping>
>                             <directory>/home/build</directory>
>                             <filemode>0755</filemode>
>                             <sources>
>                                 <source>
>                                     
> <location>${basedir}/../hudson/target/hudson-${version}-bin.tar.gz</location>
>                                     
> <targetArchitecture>x86_64</targetArchitecture>
>                                 </source>
>                             </sources>
>                         </mapping>
>                         <mapping>
>                             <directory>/home/build</directory>
>                             <filemode>0755</filemode>
>                             <sources>
>                                 <source>
>                                     
> <location>${basedir}/../plugins/target/plugins-${version}-bin.tar.gz</location>
>                                     
> <targetArchitecture>x86_64</targetArchitecture>
>                                 </source>
>                             </sources>
>                         </mapping>
>                     </mappings>
>                 </configuration>
>             </plugin>
> {code}
> and tried to use prepareScriptlet....but the resulting spec file...does not 
> contain "%prep"...
> {code}
> %define _unpackaged_files_terminate_build 0
> Name: ci001     
> Version: 1.0.2
> Release: SNAPSHOT20100127101609
> Summary: Tomcat :: Continous Integration Server Nr.: 001
> License: ....
> Distribution: Tomcat :: Continous Integration Server Nr.: 001
> Vendor: ...
> URL: ....
> Group: TEST/Collectors
> Packager: ....
> autoprov: yes
> autoreq: yes
> BuildRoot: /home/.../target/rpm/ci001/buildroot
> %description
> Continous Integration Server 001
> %install
> # Unpack the archives
> # tar -zxf hudson....tar.gz
> # tar -zxf plugins....tar.gz
> %files                  
> %defattr(-,build,users,-)
> %attr(0755,build,users) /home/build/hudson-1.0.2-SNAPSHOT-bin.tar.gz
> %attr(0755,build,users) /home/build/plugins-1.0.2-SNAPSHOT-bin.tar.gz
>                         
> %postun
> # Here we have to remove the build user (build)
> #ls -al
> {code}
> I have checked that the given exists and contains something...
> So in my opinion this seemed to be a bug.

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