Skip to content

Commit

Permalink
Merge pull request #216 from sbt/wip/rpm-docs
Browse files Browse the repository at this point in the history
Adding documentation on the repackaging option
  • Loading branch information
jsuereth committed Apr 4, 2014
2 parents c1c0edc + 0516317 commit 27d5b4c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/sphinx/DetailedTopics/redhat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Scriptlet Settings

``rpmPostun``
The ``%postun`` scriptlet to run.

``rpmBrpJavaRepackJars``
appends ``__os_install_post`` scriplet to ``rpmPre`` avoiding jar repackaging


Tasks
Expand All @@ -93,3 +96,26 @@ The Rpm support grants the following commands:

``rpm:rpmlint``
Generates the ``.rpm`` file and runs the ``rpmlint`` command to look for issues in the package. Useful for debugging.

Jar Repackaging
---------------

rpm repackages jars by default (described in this `blog post`_) in order to optimize jars.
This behaviour is turned off by default with this setting.

.. code-block:: scala
rpmBrpJavaRepackJars := false
Note that this appends content to your ``rpmPre`` definition, so make sure not to override it.
For more information on this topic follow these links:

* `issue #195`_
* `pullrequest #199`_
* `OpenSuse issue`_

.. _blog post: http://swaeku.github.io/blog/2013/08/05/how-to-disable-brp-java-repack-jars-during-rpm-build
.. _issue #195: https://github.com/sbt/sbt-native-packager/issues/195
.. _pullrequest #199: https://github.com/sbt/sbt-native-packager/pull/199
.. _OpenSuse issue: https://github.com/sbt/sbt-native-packager/issues/215

23 changes: 23 additions & 0 deletions src/sphinx/GettingStartedServers/MyFirstProject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ There are additional parameters available to configure.
daemonGroup in Linux := daemonUser.value // group which will execute the application
Default Mappings
================

The ``java_server`` archetype creates a default package structure with the following access
rights. **<package>** is a placeholder for your actual application name. By default this is
``normalizedName``.

=============================== ====== =========== =======
Folder User Permissions Purpose
=============================== ====== =========== =======
/usr/share/**<package>** root 755 / (655) static, non-changeable files
/etc/default/**<package>**.conf root 644 default config file
/etc/**<package>** root 644 config folder -> link to /usr/share/**<package-name>**/conf
/var/run/**<package>** daemon 644 if the application generates a pid on its own
/var/log/**<package>** daemon 644 log folder -> symlinked from /usr/share/**<package>**/log
=============================== ====== =========== =======

You can read more on best practices on `wikipedia filesystem hierarchy`_, `debian policies`_ and in
this `native packager discussion`_.

.. _wikipedia filesystem hierarchy: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
.. _debian policies: https://www.debian.org/doc/debian-policy/ch-files.html
.. _native packager discussion: https://github.com/sbt/sbt-native-packager/pull/174

Debian (.deb)
=============
Expand Down

0 comments on commit 27d5b4c

Please sign in to comment.