-
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
Unable to generate deb file in play 2.2-RC2 #37
Comments
Sorry that the error is a bit confusing. It's something I've been meaning to fix up, but haven't had the time. If you want to create native packages, you need to add the necessary metadata for that packaging system. E.g. Debian requires a few extra pieces:
You should check the usage in the readme to see the required metadata you need for bare-minimum packages: https://github.com/sbt/sbt-native-packager#usage You can also read our documentation for more advanced options: http://www.scala-sbt.org/sbt-native-packager/linux.html - Generic packaging setting for linux Any recommendations on (1) how to improve the documentation (2) how to improve error messages are more than welcome! Let me know if I can help in any other way :) |
@jsuereth So I went back and tried every possible setting but my efforts were still futile. I still have no idea what's going on. I checked the control file and it truly doesn't have a description. That's weird considering I have set a description in my build.sbt 😦 Any thing else I can try? Cheers Raw Links |
After modifying your build, did you type "reload" on the console? Your build.sbt file should work. I'm about to head out for the weekend, but I can respond via email. Later in the weekend, I can try it out myself to help you out. If you'd like example projects that make debians, most of them are sbt 0.12.4, which use the old .scala format, but I can send those to you. |
Hre's the project which makes debian files for sbt itself, if that helps. https://github.com/sbt/sbt-launcher-package |
Yes I did reload(after cleaning), even restarted sbt lol. Yes if you could Fayi On 20 September 2013 18:57, Josh Suereth notifications@github.com wrote:
Fayimora Femi-Balogun |
Just for the record, the command I'm running is On 20 September 2013 19:04, Fayimora Femi-Balogun fayi@fayimora.com wrote:
Fayimora Femi-Balogun |
yeah, that's the appropriate command. everything looks correct. I have ~ 10 minutes before I turn into a pumpkin (goign away for the weekend). I'll see if I can duplicate quickly. |
Thanks thanks 💃 |
Huh, odd. SO I took the reactive stocks app (https://github.com/typesafehub/reactive-stocks) and modified build.sbt: import com.typesafe.sbt.SbtNativePackager._
import com.typesafe.sbt.packager.Keys._
name := """reactive-stocks"""
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % "2.2.1",
"com.typesafe.akka" %% "akka-slf4j" % "2.2.1",
"org.webjars" %% "webjars-play" % "2.2.0",
"org.webjars" % "bootstrap" % "2.3.1",
"org.webjars" % "flot" % "0.8.0",
"com.typesafe.akka" %% "akka-testkit" % "2.2.1" % "test"
)
play.Project.playScalaSettings
description in Linux := "The description"
packageDescription in Linux := "The description"
packageSummary := "A package summary"
maintainer := "Fayimora <fayi@fayimora.com>" Then did a
Not sure what to say.... Can you reproduce following my example? It could be something else "fun" in your local project :) |
I'll clone the reactive-stocks app now and try |
oh no! It didn't work!!! Same error. Something with my Mac maybe? 😦 |
Huh... what version of dpkg? I use it from ubuntu. What did you install to try on mac, I can do that
|
@jsuereth I installed |
Debian `dpkg' package management program version 1.17.1 (darwin-amd64). |
Hi @jsuereth, have you been able to take a look at this? |
No I haven't. I am now back from travel, but I haven't had a chance to install homebrew on the mac laptop I use for testing. Like I said, this does work on my ubuntu box. I'm doing another week of cleanup, so I may have time to dig into this mac issue. It all depends on whether or not I fix the open windows issues quickily :). Any further help here appreciated. I'm also trying to write documentation for how I do testing in my dev environment, so you can experience the power of sbt :) |
Nice Nice. Thanks for the hard work. I'll try to contribute the little I Fayi On 14 October 2013 14:49, Josh Suereth notifications@github.com wrote:
Fayimora Femi-Balogun |
Hi, I'm getting the same issue : blank line in value of Description but in french : I'm using ubuntu (freshly updated to 13.10) and here is my Build.scala file : https://gist.github.com/gbougeard/7046408 |
I had the same issue-what resolved this problem for me was the addition of a setting for the key |
Ah, right. It's not apparent from the plugin, but you have to specify a few defaults to ensure that you can make the native packages. Things we can't autogenerate, like description. What I should do, is add some validation that warns you what is missing and what sbt setting will fix it, rather than relying on Sound like a good plan? Thanks to everyone for the detailed diagnosis, particularly @paddymahoney for the solution. |
@fayimora So you may also run a 'show packageDescription' and 'inspect packageDescription' - I found that the order in which I appended my project specific settings to the playScalaSettings was causing the values that I supplied for packageDescription in Debian := "My package description" to be overwritten. ie, in my play.Project, changing allowed my settings to be preserved. |
Hey @paddymahoney did you try this with a Mac? I swapped the order in my Here is my build.sbt => https://gist.github.com/7089882 |
Didn't try it with a Mac - on linux myself. What is the result of running 'show packageDescription' within your -Patrick On 21 October 2013 15:57, Fayimora Femi-Balogun notifications@github.comwrote:
|
Hi succeed i creating a .deb in play 2.2.0 with debian:packageBin but when I try to run the binary deployed (after install it with dpkg -i) I have the followingg error (in french): I can translate to : Did I miss something? Any idea? |
Sorry for not responding before. I don't have many ideas, besides saying you should try to run with |
Sorry too! I fixed it adding the right line in plugins.sbt : After that, I was able to launch my app with sudo (root access is needed to create the PID file). Now may I create a feature request to generate a service like the play2 UbuntuPackager (https://github.com/lunatech-labs/play2-ubuntu-package) ? Or maybe there is a config option for that? |
Funny you mention that..... Have you seen: https://github.com/sbt/sbt-native-packager#java-server-application-experimental I believe this was contributed back from one of those plugins :) You should be able to create an upstart service from play by adding the |
Great! I'm gonna test it right now! |
Fix #37 Adding meaningful logging, when packageDescription in Debian is
Hello,
Play! framework 2.2.x comes with the native packager bundled in. I generated a new project and tried to generate a deb but my efforts were futile. The command fails saying the description field has a blank line. Please see the image below for the full error.
I added a couple of description fields but sbt complained that the key couldn't be found. Error in image below.
I fixed this by explicitly importing
com.typesafe.sbt.packager.Keys._
. This solved the second problem - keys were now valid. However, I still was unable to generate the deb package 😦.My build.sbt can be found here.
I posted this on the play mailing list but I was told to try here.
I'll really appreciate any help I can get on this.
Cheers,
Fayi
The text was updated successfully, but these errors were encountered: