-
Notifications
You must be signed in to change notification settings - Fork 441
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
Fixes issue #789 where brpJavaRepack was negated #932
Changes from 1 commit
115c0ed
5e251e8
4398c25
3d87d82
77ababf
576f24d
0f9d721
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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} | ||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g') | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,7 @@ object RpmPlugin extends AutoPlugin { | |
rpmConflicts := Seq.empty, | ||
rpmSetarch := None, | ||
rpmChangelogFile := None, | ||
rpmBrpJavaRepackJars := false, | ||
rpmBrpJavaRepackJars := true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Together with the fix this doesn't change the default behaviour, right? I'm not building rpm's on a daily basis, so I'm not sure what impact this has. When we introduced There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @muuki88 Right, I negated the default because this is basically the behavior people had without actually knowing it so far. The time impact is pretty major if you're doing daily builds. I was waiting for one of you guys to set the tone on this, i'll revert the default to |
||
rpmPretrans := None, | ||
rpmPre := None, | ||
rpmPost := None, | ||
|
@@ -121,7 +121,7 @@ object RpmPlugin extends AutoPlugin { | |
(rpmProvides, rpmRequirements, rpmPrerequisites, rpmObsoletes, rpmConflicts) apply RpmDependencies, | ||
maintainerScripts in Rpm := { | ||
val scripts = (maintainerScripts in Rpm).value | ||
if (rpmBrpJavaRepackJars.value) { | ||
if (!rpmBrpJavaRepackJars.value) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep. This is the actual bug fix. Thanks :) |
||
val pre = scripts.getOrElse(Names.Pre, Nil) | ||
val scriptBits = IO.readStream(RpmPlugin.osPostInstallMacro.openStream, Charset forName "UTF-8") | ||
scripts + (Names.Pre -> (pre :+ scriptBits)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
enablePlugins(JavaServerAppPackaging) | ||
|
||
name := "rpm-test" | ||
|
||
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 := "1" | ||
|
||
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.spec") | ||
out.log.info(spec) | ||
assert( | ||
spec contains | ||
"""sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g'""", | ||
"Missing java repack disabling in %pre") | ||
out.log.success("Successfully tested rpm test file") | ||
() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# 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-spec-file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this bug entry. Did you try the line
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to try it now, I saw:
%define __jar_repack %nil
Yesterday. Will try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works :)