Skip to content

Releases: sbt/sbt-native-packager

RPM fixes and Docker enhancements

Pre-release

Choose a tag to compare

@muuki88 muuki88 released this 07 Aug 21:24

Breaking Changes

This release includes two changes, which will break current behavior.

dockerTarget renamed

In previous version of native-packager an undocumented setting dockerTarget was exposed.
This was renamed dockerAlias and the typed changed from String to DockerAlias. The
default value is

dockerAlias := DockerAlias(
  registryHost = dockerRepository.value,
  username = None,
  name = packageName.value,
  tag = Some(version.value)
)

See #854 for all details

Rescope rpm settings

All settings prefixed with rpm were moved out of the Rpm scope. This means that you should
remove the in Rpm configuration scope for settings and tasks prefixed with rpm. For example:

// before
rpmBrpJavaRepackJars in Rpm := false

// after
rpmBrpJavaRepackJars := false

See #826

Commits and the issues they fixed since v1.2.0-M3

Issue(s) Commit Message
#860 4e83b83 FIX #855 Syntax Error on RPM Uninstall (#860)
#789 d474fd7 Fix scoping in RPM plugin for #789 (#826) * Fix scoping in RPM plugin for #789

Pull requests since v1.2.0-M3

Pull Request(s) Commit Message
#860 e5cd694 FIX #855 Syntax Error on RPM Uninstall
#854 2da2601 Adding 'dockerBuild{Command, Options}' and renaming 'dockerTag'
#826 d474fd7 Fix scoping in RPM plugin for #789

A big thank you to all the contributors!

# Author
1 Tristan Blease
1 Mathias Kub
1 Nepomuk Seiler

System autostart

System autostart Pre-release
Pre-release

Choose a tag to compare

@muuki88 muuki88 released this 26 Jul 20:05

Commits and the issues they fixed since v1.2.0-M3

Issue(s) Commit Message
#850 b052830 Fix: exec the java entrypoint in ash-template (#850) The bash-template correct
#834 436e46c FIX #770 add ExitStatusSuccess setting for systemd (#834)
#810 880fbd5 Fix #810
#805 54973f4 maintainer file names were missing (#805) * maintainer file names were missing

Pull requests since v1.2.0-M3

Pull Request(s) Commit Message
#847 3c77da1 add support to enable/disable service autostart
#850 c1ba58d Fix: exec the java entrypoint in ash-template

A big thank you to all the contributors!

# Author
1 Nepomuk Seiler
1 David Pennell
1 Viktor Hedefalk
1 Andreas Kapp
1 Mathias Kub
1 Ignas Vyšniauskas

Systemv Fix

Choose a tag to compare

@muuki88 muuki88 released this 17 Jul 19:43

Commits and the issues they fixed since v1.1.3

Issue(s) Commit Message
#846 4f27f9c Fix typo in debian systemv script (#846) As already corrected in 1.2.x - https:/

Pull requests since v1.1.3

Pull Request(s) Commit Message
#846 151b762 Fix typo in debian systemv script

A big thank you to all the contributors!

# Author
1 Matt McDonagh

Docker backport fixes

Choose a tag to compare

@muuki88 muuki88 released this 12 Jul 18:41

Commits and the issues they fixed since v1.1.2

Issue(s) Commit Message
#818 a68c7c3 docker: tag -f is deprecated (#821) (#845) fixes #818

Pull requests since v1.1.2

Pull Request(s) Commit Message
#842 b152698 Make sbt docker:stage work on Windows
#845 6121fda docker: tag -f is deprecated (backport to 1.1.x)

A big thank you to all the contributors!

# Author
1 Maciej Biłas
1 Oskari Porkka

RPM no duplicates

Choose a tag to compare

@muuki88 muuki88 released this 02 Jul 20:01

Commits and the issues they fixed since v1.1.1

Issue(s) Commit Message
#835 #825 ff11088 V.1.1 This is a fix for #812 (#835) * add unique test for maintainer scripts

Pull requests since v1.1.1

Pull Request(s) Commit Message

A big thank you to all the contributors!

# Author
1 Andreas Kapp

Bugfix Release

Bugfix Release Pre-release
Pre-release

Choose a tag to compare

@muuki88 muuki88 released this 24 Jun 21:41

Commits and the issues they fixed since v1.2.0-M2

Issue(s) Commit Message
#762 5771d56 FIX #762 Add native packager logo to docs and README (#820) * FIX #762 Add nativ
#825 54fb9aa Fix duplicate RPM scriptlet override (#825) * add unique test for maintainer scr
#818 897b904 docker: tag -f is deprecated (#821) fixes #818
#804 6f23449 fix typo rpmScriptletsDirectory (#804)

Pull requests since v1.2.0-M2

Pull Request(s) Commit Message

A big thank you to all the contributors!

# Author
1 James Pic
1 Andreas Kapp
1 Carlos Quiroz
1 Felix Satyaputra
1 Sergey
1 Oskari Porkka
1 Nepomuk Seiler

Wix4, Systemd and Upstart

Pre-release

Choose a tag to compare

@muuki88 muuki88 released this 09 Jun 21:10

Commits and the issues they fixed since v1.2.0-M1

Issue(s) Commit Message
#795 1f67bcb Use recommended path for systemd scripts (#795) * Use recommended path for syste
#754 5d11521 Fix #754 Add kill timeout to upstart. Add retryTimeout and retries keys (#799) *
#802 8eb636d Introduce new namespace and solve duplicate key issue (#802) * Add support for W
a1d6023 Fix typo in debian systemv script. An if construct was not properly closed by

Pull requests since v1.2.0-M1

Pull Request(s) Commit Message
#798 46ea82d Fix typo in debian systemv script.Fix typo in debian systemv script.

A big thank you to all the contributors!

# Author
5 Nepomuk Seiler
1 Kirill Plyashkevich
1 Ben McCann
1 Jens Grassel
1 Simon Schulz
0 Alexey Kardapoltsev

Systemloader AutoPlugins

Pre-release

Choose a tag to compare

@muuki88 muuki88 released this 22 May 17:47

Breaking Changes

This release transfer the systemloader feature from the JavaAppServerPackaging archetype to a new set of archetype plugins called systemloader plugins.

Migration

Assuming you have build like this

enablePlugins(JavaServerAppPackaging)

you must now add a systemloader explicitly via an AutoPlugin.

enablePlugins(JavaServerAppPackaging, SystemdPlugin)

You also need to remove code like this as it will not work anymore

// import is wrong
import com.typesafe.sbt.packager.archetypes.ServerLoader
// will have strange effects
serverLoading in Rpm := ServerLoader.Upstart
serverLoading in Debian := ServerLoader.SystemV

Motivation

Why did we change this behaviour?

  1. Default choices for systemloaders are to fragile as these vary from distribution and version
  2. Customization was not really possible. Now we can provide systemloader specific task/settings to customize the systemloader configurations
  3. Reusability. You are now free to use systemloaders with everyother archetype without the setup the JavaServerAppPackaging adds. For example enablePlugins(JavaAppPackaging, SystemdPlugin) is enough if you don't need log and pid folders or the etc-default support.
  4. Cleaner code. This is affects you directly as we can change systemloader behaviour faster and fix bugs in the plugin responsible for the specific systemloader. Next steps will be to add customization for systemd ( see #785 for a list of related issues ).

This changes however come at a price. You now only can use one systemloader per sbt-module. If you need different systemloaders for rpm/debian, you will have to create two submodules with different configurations.

See #785 for the initial discussion.

Commits and the issues they fixed since v1.1.1

Issue(s) Commit Message
#785 0a6be58 Extract Systemloaders into AutoPlugins (#785) * Add systemd plugin. Idea on how

Pull requests since v1.1.1

Pull Request(s) Commit Message

A big thank you to all the contributors!

# Author
3 Nepomuk Seiler

Docker / Daemon log / Bugfixes

Choose a tag to compare

@muuki88 muuki88 released this 19 May 14:06

Changes

  • daemonStdoutLogFile for SystemV systemloader
  • Fixing JAVA_OPTS for ash script
  • Fixing path separator for Docker commands on Windows

Commits and the issues they fixed since v1.1.0

Issue(s) Commit Message
#792 6ef8956 fix #766 (#792)

Pull requests since v1.1.0

Pull Request(s) Commit Message
#765 0a212be Windows Make Docker plugin portable so that Windows is supportedMake Docker plug
#772 cdc207e daemonStdoutLogFile setting implementeddaemonStdoutLogFile setting implemented

A big thank you to all the contributors!

# Author
2 Nepomuk Seiler
1 David Pennell
1 Gia Bảo
1 Marius B. Kotsbak
1 Paul Draper
1 Alexey Kardapoltsev

Docker and Server improvements

Choose a tag to compare

@muuki88 muuki88 released this 24 Apr 19:46

Changes

Maintainer Scripts

The rpm and debian maintainer scripts have grown over the past years in sbt-native-packager. There settings for rpm scriplets (e.g. rpmPre) with hard to use types (Option[String]) or no helper methods for the debianMaintainerScripts.

With this milestone we introduce a new task-setting:

maintainerScripts: Map[String, Seq[String]]

This will serve as the low level data-structure for all package formats that use maintainer scripts. We have plenty of docs to support you:

To give you a peak what it looked before and after

Before

rpmPostun := rpmPost.value.map { content =>
  s"""|$content
     |echo 'hello, world
     |""".stripMargin
  }.orElse {
   Option("""echo 'hello, world"
   """.stripMargin)
  }

After

import RpmConstants._
maintainerScripts in Rpm := maintainerScriptsAppend((maintainerScripts in Rpm).value)(
   Postun -> "echo 'hello, world'"
)

JDeb & Spotify-Docker marked as "provided"

We marked both dependencies as provided to avoid unnecessary dependencies you either need nor want.
Both introduced issues with logging on the sbt-level as well.

Migration

If you used either the JDebPackaging or DockerSpotifyClientPlugin autoplugins you need to add the dependencies your self. In your plugins.sbt add the following

// if you use JDeb
libraryDependencies += "org.vafer" % "jdeb" % "1.3" artifacts (Artifact("jdeb", "jar", "jar"))

// if you use Spotify Docker
libraryDependencies += "com.spotify" % "docker-client" % "3.2.1"

Proguard documentation

@mikebridge added documentation on how to use sbt-proguard along with sbt-assembly
and sbt-native-packager

http://www.scala-sbt.org/sbt-native-packager/topics/custom.html#proguard

Commits and the issues they fixed since v1.0.6

Issue(s) Commit Message
#777 cdf7eff FIX #777 adding recipes for different packages
#776 a9bc669 Fix #776 using $DAEMON_GROUP to indicate group in Redhat startup template
ea2f6f3 Fix an obvious typo
#676 4ff3a85 FIX #676 adding configuration scopes to project configurations
#651 5bd92bd FIX #651 add code snippet to universal docs
#683 db3d6b4 FIX #683 add references to play documentation
#699 ae64ee3 FIX #699 add recipe for scalajs packaging
#678 9789e97 FIX #678 add reference to sbt-native-packager-examples
#750 c41a72e FIX #750 remove outdated documentation
cadac9d Fix errors when .bat file path contains paranthesis. Without double quotes the p
8f1fd78 Updates version of DockerSpotifyClient to 3.5.13 and fixes NullPointerException
#737 af63778 SystemD services now source /etc/default/{{app_name}} #737 This change modifies
3cec2d6 Fixing typos and sort related plugins
d109245 Fix typo in description of maintainerScripts
#731 ab1abad FIX #731 add options for zip and tarballs
007ddf4 Fixing sphinx formatting error

Pull requests since v1.0.6

Pull Request(s) Commit Message
#625 57c938d Unify maintainerScriptsUnify maintainerScripts
#713 07290f5 Bumped version number in Installation section.Bumped version number in Installa
#715 7c2b66e Travis: build on OS X (take 2)Travis: build on OS X (take 2)
#719 852e4b4 Mark docker and jdeb as provided dependenciesMark docker and jdeb as provided d
#720 409497a Adding ant dependency for jdkpackager builds. Follow up to #719Adding ant depen
#721 21ad738 Add Proguard example to Custom Package Format documentationAdd Proguard example
#732 3eca218 FIX #731 add options for zip and tarballsFIX #731 add options for zip and tarba
#733 e2d4453 Docker Plugin qualificationDocker Plugin qualification
#741 12c1549 Readme cleanupReadme cleanup
#743 0ff5b77 Fix typo in description of maintainerScriptsFix typo in description of maintain
#745 e32a059 SystemD services now source /etc/default/{{app_name}} (resolves #737)SystemD se
#748 fd3d9cf Fix errors when .bat file path contains paranthesis.Fix errors when .bat file p
#749 9fb55c7 Updates version of DockerSpotifyClient to 3.5.13 and fixes NullPointerException
#751 94ff880 FIX #750 remove outdated documentationFIX #750 remove outdated documentation
#755 9e54569 Major documentation clean up and preps for readthedocsMajor documentation clean
#757 66dd482 FIX #676 adding configuration scopes to project configurationsFIX #676 adding c
#766 576add2 AshScriptPlugin - Restore argument behavior as it was before a037519AshScriptPl
#767 de98975 Fix an obvious typoFix an obvious typo
#771 67bf957 Add a few docker tests for travisAdd a few docker tests for travis
#774 eb9c03d Add hint for win...
Read more