Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding documentation on the repackaging option #216

Merged
merged 3 commits into from
Apr 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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