-
Notifications
You must be signed in to change notification settings - Fork 443
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
rpmPrefix has no effect during rpm:packageBin #672
Comments
Are you using the latest milestone Am 19.09.2015 6:07 nachm. schrieb alecswan [email protected]:Hello, I added the following setting in build.sbt Is this a bug or I'm doing something wrong? Thanks! —Reply to this email directly or view it on GitHub. |
I upgraded to 1.0.5-M3 but without any success. sbt rpm:packageBin task still produces an RPM with the old paths. I see the following warnings during the task execution which seems to me that 0.7.4 was evicted in favor of 1.0.5-M3, but I am not sure if it has some other side effects: I am running this on CentOS 6.5 with Java 7 and sbt 0.13.9. |
Can you post your full |
/**
// The Typesafe repository // Use the Play sbt plugin for Play projects addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1") addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0") addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0") addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.2") addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0") addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0") // Support packaging plugins resolvers += Classpaths.sbtPluginReleases addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.4") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0") On Sun, Sep 20, 2015 at 3:24 PM, Nepomuk Seiler [email protected]
|
And here is build.sbt you asked for: /**
/* For packaging purposes, -SNAPSHOT MUST contain a digit */ scalaVersion := "2.11.7" scalacOptions ++= Seq("-Xlint:-missing-interpolator","-Xfatal-warnings","-deprecation","-feature","-language:implicitConversions","-language:postfixOps") // From https://www.playframework.com/documentation/2.3.x/ProductionDist libraryDependencies ++= Seq( net.virtualvoid.sbt.graph.Plugin.graphSettings LessKeys.compress in Assets := true pipelineStages := Seq(digest, gzip) includeFilter in (Assets, LessKeys.less) := "*.less" lazy val root = (project in file(".")).enablePlugins(PlayScala) ScoverageSbtPlugin.ScoverageKeys.coverageExcludedPackages := ";controllers.;views.;models.*" /*
/* Debian Settings - to create, run as: See here for details: maintainer := "Yahoo [email protected]" /* End Debian Settings */ /* RPM Settings - to create, run as: See here for details: rpmRelease := "1" /* End RPM Settings */ |
Any update on this? Would be nice to be able to use rpmPrefix and have the install be self-contained to the location specified. |
So I believe this isn't really a bug (except that in the SPECS it's "prefix" instead of "Prefix", which I can create a pull request for shortly). I believe this is due to our misunderstanding of what Prefix is used for. Basically it's not designed to say "install into the 'Prefix' location". It's designed to say "make all paths in the 'Prefix' location relocatable if the installing user requests it as such using The real issue is that the rpm packager doesn't support multiple
I will try to see if I can come up with that kind of a change and submit it in a pull request. |
I just found a workaround for the current version that also lets the paths to be relocated (basically a space-delimited string):
The biggest problem I see is that relocating these packages will break the /etc/init.d script. My best guess is instead to let it install like normal and then create symlinks from the location you would want to see this be housed (for easier maintenance). EDIT> It occurred to me that maybe the prefixing could work such that the original paths get symlinked to the target self-contained folder during relocation. I haven't tested to see if RPM just does that on its own or not, but if so it would be the solution I think. |
Submitted #698 to support multiple prefixes. If it's determined that it's not necessary, I completely understand. It's there if it's useful :) |
Hello,
I added the following setting in build.sbt
rpmPrefix := Some("/opt/kafka-manager")
and ran
sbt rpm:packageBin
which generated an RPM file but "rpm -qpl target/rpm/RPMS/noarch/kafka-manager-*.rpm" still shows all jars and javadoc files under /usr/share/kafka-manager/. When I install the RPM it does the same thing and puts jars and javadoc under /usr/share/kafka-manager/.
Is this a bug or I'm doing something wrong?
Thanks!
The text was updated successfully, but these errors were encountered: