Skip to content

Commit

Permalink
o More stuff.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.codehaus.org/mojo/trunk/mojo/unix@14315 52ab4f32-60fc-0310-b215-8acea882cd1b
  • Loading branch information
trygvis committed Jul 8, 2011
1 parent e0a6b02 commit 8252e91
Show file tree
Hide file tree
Showing 20 changed files with 477 additions and 115 deletions.
5 changes: 5 additions & 0 deletions unix-handbook/build.xml
Expand Up @@ -86,6 +86,11 @@
</target> </target>


<target name="create-pom"> <target name="create-pom">
<antcall target="process-pom">
<param name="example.project" value="basic"/>
<param name="example.format" value="deb"/>
</antcall>

<antcall target="process-pom"> <antcall target="process-pom">
<param name="example.project" value="basic"/> <param name="example.project" value="basic"/>
<param name="example.format" value="pkg"/> <param name="example.format" value="pkg"/>
Expand Down
@@ -0,0 +1,8 @@
$ dpkg-deb -c target/*.deb
drwxr-xr-x root/root 0 2011-07-07 16:38 ./
drwxr-xr-x root/root 0 2011-07-07 16:38 ./var/
drwxr-xr-x root/root 0 2011-07-07 16:38 ./var/log/
drwxr-xr-x root/root 0 2011-07-07 16:38 ./opt/
drwxr-xr-x root/root 0 2011-07-07 16:38 ./opt/hudson/
-rw-r--r-- root/root 20623413 2011-04-27 10:41 ./opt/hudson/hudson.war
lrwxrwxrwx root/root 0 2011-07-07 16:38 ./var/log/hudson -> /var/opt/hudson/log
143 changes: 110 additions & 33 deletions unix-handbook/src/main/docbook/content/handbook.xml
Expand Up @@ -411,7 +411,7 @@
</warning> </warning>


<para>This is an example on how a simple, standalone application can be <para>This is an example on how a simple, standalone application can be
packaged. The example is available in all three formats.</para> packaged. The example is available in all four formats.</para>


<para>Keywords:</para> <para>Keywords:</para>


Expand All @@ -437,55 +437,111 @@
</itemizedlist> </itemizedlist>


<section> <section>
<title>The pom.xml for pkg</title> <title>The Deb version</title>


<programlisting language="xml"><?dbfo-font-size 75% ?><xi:include <section>
href="../examples/basic/pom-pkg.xml" parse="text" /></programlisting> <title><code>pom.xml</code> for the deb version</title>

<programlisting language="xml"><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/pom-deb.xml" parse="text" /></programlisting>
</section>

<section>
<title>Resulting Deb</title>

<para>After running <command>mvn install</command> on the project,
the package is packaged into
<filename>target/basic-1.0-SNAPSHOT.deb</filename>.</para>

<para>The package will contain these files:</para>

<screen><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/dpkg-deb-c.txt" parse="text" /></screen>

<para>The generated control file:</para>

<screen><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/dpkg-deb-f.txt" parse="text" /></screen>
</section>
</section> </section>


<section> <section>
<title>Resulting PKG</title> <title>The Pkg version</title>


<para>After running <command>mvn install</command> on the pkg version <section>
of the project, the package is packaged into <title><code>pom.xml</code> for the pkg version</title>
<filename>target/basic-pkg-1.0.pkg</filename>.</para>


<para>The generated meta data will look like this:</para> <programlisting language="xml"><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/pom-pkg.xml" parse="text" /></programlisting>
</section>


<screen><?dbfo-font-size 75% ?><xi:include <section>
href="../examples/basic/pkginfo.txt" parse="text" /></screen> <title>Resulting PKG</title>

<para>After running <command>mvn install</command> on the pkg
version of the project, the package is packaged into
<filename>target/basic-pkg-1.0.pkg</filename>.</para>

<para>The generated meta data will look like this:</para>


<para>Notice that the SNAPSHOT part of the version string has been <screen><?dbfo-font-size 75% ?><xi:include
replaced with the a timestamp.</para> href="../examples/basic/pkginfo.txt" parse="text" /></screen>


<para>To see verify the paths and their attributes, run this:</para> <para>Notice that the SNAPSHOT part of the version string has been
replaced with the a timestamp.</para>


<screen><?dbfo-font-size 75% ?><xi:include <para>To see verify the paths and their attributes, run this:</para>
href="../examples/basic/pkgchk.txt" parse="text" /></screen>
<screen><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/pkgchk.txt" parse="text" /></screen>
</section>
</section> </section>


<section> <section>
<title>Resulting RPM</title> <title>The RPM version</title>

<section>
<title><code>pom.xml</code> for RPM version</title>

<programlisting language="xml"><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/pom-pkg.xml" parse="text" /></programlisting>
</section>


<para>After running <command>mvn install</command> on the rpm version <section>
of the project, the package is packaged into <title>Resulting RPM</title>
<filename>target/basic-pkg-1.0.rpm</filename>.</para>
<para>After running <command>mvn install</command> on the rpm
version of the project, the package is packaged into
<filename>target/basic-pkg-1.0.rpm</filename>.</para>


<para>The package will contain these files:</para> <para>The package will contain these files:</para>


<screen><xi:include href="../examples/basic/rpm-qlp.txt" parse="text" /></screen> <screen><xi:include href="../examples/basic/rpm-qlp.txt"
parse="text" /></screen>
</section>
</section> </section>


<section> <section>
<title>Resulting ZIP</title> <title>The Zip version</title>


<para>After running <command>mvn install</command> on the rpm version <section>
of the project, the package is packaged into <title><code>pom.xml</code> for the zip version</title>
<filename>target/basic-pkg-1.0.rpm</filename>.</para>
<programlisting language="xml"><?dbfo-font-size 75% ?><xi:include
href="../examples/basic/pom-pkg.xml" parse="text" /></programlisting>
</section>

<section>
<title>Resulting ZIP</title>

<para>After running <command>mvn install</command> on the rpm
version of the project, the package is packaged into
<filename>target/basic-pkg-1.0.rpm</filename>.</para>


<para>The zip will contain these files:</para> <para>The zip will contain these files:</para>


<screen><xi:include href="../examples/unzip-l.txt" parse="text" /></screen> <screen><xi:include href="../examples/unzip-l.txt" parse="text" /></screen>
</section>
</section> </section>
</chapter> </chapter>


Expand Down Expand Up @@ -780,6 +836,12 @@
</tbody> </tbody>
</tgroup> </tgroup>
</informaltable> </informaltable>

<para>For the allowed values for the priority field, see <link
xlink:href="http://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities"><code>priorities</code></link>
and <link
xlink:href="http://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections"><code>sections</code></link>
sections in the Debian Policy Manual.</para>
</section> </section>


<section> <section>
Expand Down Expand Up @@ -2207,17 +2269,17 @@
<title>Upgrading From Previous Versions</title> <title>Upgrading From Previous Versions</title>
<section> <section>
<title>Upgrading from 1.0-alpha-1</title> <title>Upgrading from 1.0-alpha-1</title>
<copy> => <copyFile>, <copyDirectory> <copy> => <copyFile>, <copyDirectory>
<defaults> <defaults>
<fileUser>..</fileUser> <fileUser>..</fileUser>
<fileGroup>..</fileGroup> <fileGroup>..</fileGroup>
<directoryUser>..</directoryUser> <directoryUser>..</directoryUser>
<directoryGroup>..</directoryGroup> <directoryGroup>..</directoryGroup>
</defaults> </defaults>
=> =>
<defaults> <defaults>
<fileAttributes> <fileAttributes>
<user>..</user> <user>..</user>
Expand All @@ -2239,7 +2301,22 @@
into and disassembling packages.</para> into and disassembling packages.</para>


<section> <section>
<title>RP</title> <title><code>dpkg</code> Commands</title>

<section>
<title>Listing All Files In a Package</title>

<example>
<title>Output of <code>rpm -q -l -p</code></title>

<screen><?dbfo-font-size 75%?><xi:include
href="command-reference/rpm-qlp.txt" parse="text" /></screen>
</example>
</section>
</section>

<section>
<title><code>rpm</code> Commands</title>


<section> <section>
<title>List All Files In a Package</title> <title>List All Files In a Package</title>
Expand Down Expand Up @@ -2279,7 +2356,7 @@
</section> </section>


<section> <section>
<title>Zip</title> <title><code>zip</code> Commands</title>


<para>Note that there are no standard for the utilities used to handle <para>Note that there are no standard for the utilities used to handle
zip files. However, most platforms support this command.</para> zip files. However, most platforms support this command.</para>
Expand Down
11 changes: 11 additions & 0 deletions unix-handbook/src/main/docbook/examples/basic/dpkg-deb-c.txt
@@ -0,0 +1,11 @@
$ dpkg-deb -c target/*.deb
drwxr-xr-x root/root 0 2011-07-08 17:10 ./
drwxr-xr-x root/root 0 2011-07-08 17:10 ./var/
drwxr-xr-x root/root 0 2011-07-08 17:10 ./var/log/
drwxr-xr-x root/root 0 2011-07-08 17:10 ./opt/
drwxr-xr-x root/root 0 2011-07-08 17:10 ./opt/hudson/
drwxr-xr-x root/root 0 2011-07-08 17:10 ./opt/hudson/doc/
-rw-r--r-- root/root 1544 2008-10-02 02:07 ./opt/hudson/doc/dc-license.txt
-rw-r--r-- root/root 49 2008-10-02 02:07 ./opt/hudson/doc/atom-license.txt
-rw-r--r-- root/root 20623413 2011-04-27 10:41 ./opt/hudson/hudson.war
lrwxrwxrwx root/root 0 2011-07-08 17:10 ./var/log/hudson -> /var/opt/hudson/log
8 changes: 8 additions & 0 deletions unix-handbook/src/main/docbook/examples/basic/dpkg-deb-f.txt
@@ -0,0 +1,8 @@
$ dpkg-deb -f target/*.deb
Package: basic
Section: devel
Priority: standard
Maintainer: Acme
Version: 1.0-20110708.151032
Architecture: all
Description: Hudson Solaris Package
26 changes: 26 additions & 0 deletions unix-handbook/src/main/docbook/examples/basic/mvn-deb.txt
@@ -0,0 +1,26 @@
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hudson Solaris Package 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ basic ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ basic ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory ~/unix/unix-handbook/src/main/docbook/examples/basic/src/main/resources
[INFO]
[INFO] --- unix-maven-plugin:1.0-alpha-5-SNAPSHOT:package-deb (default-package-deb) @ basic ---
[INFO] Using "/tmp/vfs_cache" as temporary files store.
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ basic ---
[INFO] Installing ~/unix/unix-handbook/src/main/docbook/examples/basic/target/basic-1.0-SNAPSHOT.deb to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.deb
[INFO] Installing ~/unix/unix-handbook/src/main/docbook/examples/basic/pom-deb.xml to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.001s
[INFO] Finished at: Fri Jul 08 17:10:34 CEST 2011
[INFO] Final Memory: 9M/149M
[INFO] ------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions unix-handbook/src/main/docbook/examples/basic/mvn-pkg.txt
Expand Up @@ -5,8 +5,8 @@
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] [clean:clean] [INFO] [clean:clean]
[INFO] [resources:resources] [INFO] [resources:resources]
[WARNING] Using platform encoding (ISO646-US actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/trygvis/dev/org.codehaus.mojo/trunk/mojo/unix/src/examples/basic-pkg/src/main/resources [INFO] skip non existing resourceDirectory ~/unix/unix-handbook/src/main/docbook/examples/basic/src/main/resources
[INFO] [unix:package-pkg] [INFO] [unix:package-pkg]
. .
opt opt
Expand All @@ -20,7 +20,7 @@
hudson hudson


[INFO] [install:install] [INFO] [install:install]
[INFO] Installing /home/trygvis/dev/org.codehaus.mojo/trunk/mojo/unix/src/examples/basic-pkg/target/basic-1.0-SNAPSHOT.pkg to /home/trygvis/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pkg [INFO] Installing ~/unix/src/examples/basic-pkg/target/basic-1.0-SNAPSHOT.pkg to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pkg
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL [INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
Expand Down
20 changes: 10 additions & 10 deletions unix-handbook/src/main/docbook/examples/basic/mvn-rpm.txt
@@ -1,22 +1,22 @@
[INFO] Scanning for projects... [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] Building Hudson Solaris Package 1.0-SNAPSHOT [INFO] Building Hudson Solaris Package 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ basic --- [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ basic ---
[INFO] [INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ basic --- [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ basic ---
[debug] execute contextualize [debug] execute contextualize
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/trygvis/dev/org.codehaus/mojo/trunk/mojo/unix/unix-handbook/src/main/docbook/examples/basic/src/main/resources [INFO] skip non existing resourceDirectory ~/unix/unix-handbook/src/main/docbook/examples/basic/src/main/resources
[INFO] [INFO]
[INFO] --- unix-maven-plugin:1.0-alpha-5-SNAPSHOT:package-rpm (default-package-rpm) @ basic --- [INFO] --- unix-maven-plugin:1.0-alpha-5-SNAPSHOT:package-rpm (default-package-rpm) @ basic ---
[INFO] Using "/var/folders/Wb/WbbGqdy4FmuoMHaIo5r-aU+++TM/-Tmp-/vfs_cache" as temporary files store. [INFO] Using "/tmp/vfs_cache" as temporary files store.
[INFO] [INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ basic --- [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ basic ---
[INFO] Installing /Users/trygvis/dev/org.codehaus/mojo/trunk/mojo/unix/unix-handbook/src/main/docbook/examples/basic/target/basic-1.0-SNAPSHOT.rpm to /Users/trygvis/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.rpm [INFO] Installing ~/unix/unix-handbook/src/main/docbook/examples/basic/target/basic-1.0-SNAPSHOT.rpm to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.rpm
[INFO] Installing /Users/trygvis/dev/org.codehaus/mojo/trunk/mojo/unix/unix-handbook/src/main/docbook/examples/basic/pom-rpm.xml to /Users/trygvis/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pom [INFO] Installing ~/unix/unix-handbook/src/main/docbook/examples/basic/pom-rpm.xml to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS [INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
Expand Down
20 changes: 10 additions & 10 deletions unix-handbook/src/main/docbook/examples/basic/mvn-zip.txt
@@ -1,22 +1,22 @@
[INFO] Scanning for projects... [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] Building Hudson Solaris Package 1.0-SNAPSHOT [INFO] Building Hudson Solaris Package 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ basic --- [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ basic ---
[INFO] [INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ basic --- [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ basic ---
[debug] execute contextualize [debug] execute contextualize
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/trygvis/dev/org.codehaus/mojo/trunk/mojo/unix/unix-handbook/src/main/docbook/examples/basic/src/main/resources [INFO] skip non existing resourceDirectory ~/unix/unix-handbook/src/main/docbook/examples/basic/src/main/resources
[INFO] [INFO]
[INFO] --- unix-maven-plugin:1.0-alpha-5-SNAPSHOT:package-zip (default-package-zip) @ basic --- [INFO] --- unix-maven-plugin:1.0-alpha-5-SNAPSHOT:package-zip (default-package-zip) @ basic ---
[INFO] Using "/var/folders/Wb/WbbGqdy4FmuoMHaIo5r-aU+++TM/-Tmp-/vfs_cache" as temporary files store. [INFO] Using "/tmp/vfs_cache" as temporary files store.
[INFO] [INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ basic --- [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ basic ---
[INFO] Installing /Users/trygvis/dev/org.codehaus/mojo/trunk/mojo/unix/unix-handbook/src/main/docbook/examples/basic/target/basic-1.0-SNAPSHOT.zip to /Users/trygvis/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.zip [INFO] Installing ~/unix/unix-handbook/src/main/docbook/examples/basic/target/basic-1.0-SNAPSHOT.zip to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.zip
[INFO] Installing /Users/trygvis/dev/org.codehaus/mojo/trunk/mojo/unix/unix-handbook/src/main/docbook/examples/basic/pom-zip.xml to /Users/trygvis/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pom [INFO] Installing ~/unix/unix-handbook/src/main/docbook/examples/basic/pom-zip.xml to ~/.m2/repository/org/codehaus/mojo/unix/example/basic/1.0-SNAPSHOT/basic-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS [INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion unix-handbook/src/main/docbook/examples/basic/pkginfo.txt
@@ -1,6 +1,6 @@
$ pkginfo -l -d target/basic-*.pkg $ pkginfo -l -d target/basic-*.pkg
PKGINST: basic PKGINST: basic
NAME: Hudson Solaris Package NAME: Hudson
CATEGORY: application CATEGORY: application
ARCH: all ARCH: all
VERSION: 1.0-20090513.193125 VERSION: 1.0-20090513.193125
Expand Down

0 comments on commit 8252e91

Please sign in to comment.