-
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.
Browse files
Browse the repository at this point in the history
* Fixed issue #789 where brpJavaRepack was negated (set to 'false' instead of 'true') * 1. Changed brpJavaRepack command to a supported flag on RPM 2. Changed the default of repack from true to false, which means repack will not run by default. * 1. Removed debug logs 2. Added a test to make sure java repack is ran when set to `true`. * Triggering rebuild. * Modified RPM names to avoid race conditions and failing tests. * Fixed broken tests (missing renaming in places, comments). * Updated RPM repacking description in the docs.
- Loading branch information
1 parent
fa717bb
commit e793228
Showing
14 changed files
with
86 additions
and
16 deletions.
There are no files selected for viewing
7 changes: 1 addition & 6 deletions
7
src/main/resources/com/typesafe/sbt/packager/rpm/brpJavaRepackJar
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 |
---|---|---|
@@ -1,6 +1 @@ | ||
%define __os_install_post \ | ||
%{_rpmconfigdir}/brp-compress \ | ||
%{!?__debug_package:%{_rpmconfigdir}/brp-strip %{__strip}} \ | ||
%{_rpmconfigdir}/brp-strip-static-archive %{__strip} \ | ||
%{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \ | ||
%{nil} | ||
%define __jar_repack %nil |
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,31 @@ | ||
|
||
enablePlugins(JavaServerAppPackaging) | ||
|
||
name := "rpm-test-no-repack" | ||
|
||
version := "0.1.0" | ||
|
||
maintainer := "Josh Suereth <joshua.suereth@typesafe.com>" | ||
|
||
packageSummary := "Test rpm package" | ||
|
||
packageDescription := | ||
"""A fun package description of our software, | ||
with multiple lines.""" | ||
|
||
rpmRelease := "2" | ||
|
||
rpmVendor := "typesafe" | ||
|
||
rpmUrl := Some("http://github.com/sbt/sbt-native-packager") | ||
|
||
rpmLicense := Some("BSD") | ||
|
||
rpmBrpJavaRepackJars := false | ||
|
||
TaskKey[Unit]("check-spec-file") <<= (target, streams) map { (target, out) => | ||
val spec = IO.read(target / "rpm" / "SPECS" / "rpm-test-no-repack.spec") | ||
assert(spec.contains("""%define __jar_repack %nil"""), "Missing java repack disabling in %pre") | ||
out.log.success("Successfully tested rpm test file") | ||
() | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/rpm/scriplets-no-javarepack-rpm/project/plugins.sbt
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,6 @@ | ||
# Run the RPM packaging. | ||
> rpm:package-bin | ||
$ exists target/rpm/RPMS/noarch/rpm-test-no-repack-0.1.0-2.noarch.rpm | ||
$ exists target/rpm/SPECS/rpm-test-no-repack.spec | ||
|
||
> 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
enablePlugins(JavaServerAppPackaging) | ||
|
||
name := "rpm-test-with-repack" | ||
|
||
version := "0.1.0" | ||
|
||
maintainer := "Josh Suereth <joshua.suereth@typesafe.com>" | ||
|
||
packageSummary := "Test rpm package" | ||
|
||
packageDescription := | ||
"""A fun package description of our software, | ||
with multiple lines.""" | ||
|
||
rpmRelease := "2" | ||
|
||
rpmVendor := "typesafe" | ||
|
||
rpmUrl := Some("http://github.com/sbt/sbt-native-packager") | ||
|
||
rpmLicense := Some("BSD") | ||
|
||
rpmBrpJavaRepackJars := true | ||
|
||
TaskKey[Unit]("check-spec-file") <<= (target, streams) map { (target, out) => | ||
val spec = IO.read(target / "rpm" / "SPECS" / "rpm-test-with-repack.spec") | ||
assert(!spec.contains("""%define __jar_repack %nil"""), "%pre should not contain jar repack when set to true") | ||
out.log.success("Successfully tested rpm test file") | ||
() | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/rpm/scriplets-use-javarepack-rpm/project/plugins.sbt
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,6 @@ | ||
# Run the RPM packaging. | ||
> rpm:package-bin | ||
$ exists target/rpm/RPMS/noarch/rpm-test-with-repack-0.1.0-2.noarch.rpm | ||
$ exists target/rpm/SPECS/rpm-test-with-repack.spec | ||
|
||
> 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
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