-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #332 from antonini/master
Implemented the changelog to RPM
- Loading branch information
Showing
10 changed files
with
106 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import NativePackagerKeys._ | ||
|
||
packageArchetype.java_server | ||
|
||
name := "rpm-test" | ||
|
||
version := "0.1.0" | ||
|
||
maintainer := "Endrigo Antonini <[email protected]>" | ||
|
||
packageSummary := "Test rpm package with changelog" | ||
|
||
packageDescription := """A fun package description of our software, | ||
with multiple lines.""" | ||
|
||
rpmRelease := "1" | ||
|
||
rpmVendor := "eidoscode" | ||
|
||
rpmUrl := Some("http://github.com/sbt/sbt-native-packager") | ||
|
||
rpmLicense := Some("BSD") | ||
|
||
rpmChangelogFile := Some("conf/changelog") | ||
|
||
TaskKey[Unit]("check-spec-file") <<= (target, streams) map { (target, out) => | ||
val spec = IO.read(target / "rpm" / "SPECS" / "rpm-test.spec") | ||
// Check if the RPM writted the changelog tag on the task | ||
assert(spec contains "%changelog\n", "Spec doesn't contain %changelog tag on the SPEC") | ||
out.log.success("Successfully tested rpm test file") | ||
() | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* Sun Aug 24 2014 Team <[email protected]> - 1.1.0 | ||
-Allow to login using social networks | ||
* Wed Aug 20 2014 Team <[email protected]> - 1.0.1 | ||
-Vulnerability fix. | ||
-Other information. | ||
-Feature list. | ||
* Tue Aug 19 2014 Team <[email protected]> - 1.0.0 | ||
-First version of the system | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Run the debian packaging. | ||
> rpm:package-bin | ||
$ exists target/rpm/RPMS/noarch/rpm-test-0.1.0-1.noarch.rpm | ||
$ exists target/rpm/SPECS/rpm-test.spec | ||
|
||
# Check files for defaults | ||
> check-spec-file | ||
> set NativePackagerKeys.rpmBrpJavaRepackJars := true | ||
> check-spec-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ Rpms require the following specific settings: | |
rpmVendor := "typesafe", | ||
rpmUrl := Some("http://github.com/paulp/sbt-extras"), | ||
rpmLicense := Some("BSD"), | ||
rpmChangelogFile := Some("changelog") | ||
Informational Settings | ||
|
@@ -63,6 +64,9 @@ Meta Settings | |
``rpmPrefix`` | ||
The path passed set as the base for the revocable package | ||
|
||
``rpmChangelogFile`` | ||
External file to be imported and used to generate the changelog of the RPM. | ||
|
||
|
||
Scriptlet Settings | ||
~~~~~~~~~~~~~~~~~~ | ||
|
@@ -119,6 +123,28 @@ Example Settings | |
defaultLinuxLogsLocation := defaultLinuxInstallLocation + "/" + name | ||
rpmChangelogFile | ||
---------- | ||
The rpmChangelogFile property allows you to set a source that will be imported and used on the RPM generation. So if you use rpm commands to see the changelog it brings that information. You have to create the content on that file following the RPM conventions that are available here http://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs. | ||
|
||
Example Settings | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: scala | ||
changelog := "changelog.txt", | ||
rpmChangelogFile := Some(changelog) | ||
.. code-block:: txt | ||
* Sun Aug 24 2014 Team <[email protected]> - 1.1.0 | ||
-Allow to login using social networks | ||
* Wed Aug 20 2014 Team <[email protected]> - 1.0.1 | ||
-Vulnerability fix. | ||
* Tue Aug 19 2014 Team <[email protected]> - 1.0.0 | ||
-First version of the system | ||
Template Changes | ||
~~~~~~~~~~~~~~~~~~ | ||
Apply the following changes to the default init start script. You can find this in the sbt-native-packager source. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* Sun Aug 24 2014 Team <[email protected]> - 1.1.0 | ||
-Allow to login using social networks | ||
* Wed Aug 20 2014 Team <[email protected]> - 1.0.1 | ||
-Vulnerability fix. | ||
-Other information. | ||
-Feature list. | ||
* Tue Aug 19 2014 Team <[email protected]> - 1.0.0 | ||
-First version of the system | ||
|