-
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.
Don't compress debian packages (#787)
Also allow custom options to dpkg-deb --build
- Loading branch information
1 parent
ae04b90
commit cee091c
Showing
10 changed files
with
55 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,14 @@ | ||
enablePlugins(DebianPlugin) | ||
|
||
debianNativeBuildOptions in Debian := Nil | ||
|
||
maintainer := "Maintainer <[email protected]>" | ||
|
||
packageDescription := "Description" | ||
|
||
packageSummary := "Summary" | ||
|
||
TaskKey[Unit]("check-deb-compression") := { | ||
val deb = target.value / s"${(name in Debian).value}_${(version in Debian).value}_all.deb" | ||
assert(Seq("ar", "-t", deb.toString).lines.exists(_.startsWith("data.tar."))) // exact extension varies by dpkg-deb 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 @@ | ||
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,2 @@ | ||
> debian:packageBin | ||
> check-deb-compression |
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,12 @@ | ||
enablePlugins(DebianPlugin) | ||
|
||
maintainer := "Maintainer <[email protected]>" | ||
|
||
packageDescription := "Description" | ||
|
||
packageSummary := "Summary" | ||
|
||
TaskKey[Unit]("check-deb-compression") := { | ||
val deb = target.value / s"${(name in Debian).value}_${(version in Debian).value}_all.deb" | ||
assert(Seq("ar", "-t", deb.toString).lines.contains("data.tar")) | ||
} |
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,2 @@ | ||
> debian:packageBin | ||
> check-deb-compression |
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
cee091c
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.
Note that this is not supported by debian wheezy's python-apt module: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718330
So, installing it with something like ansible or whatever using python-apt will crash with something like : No debian package found, missing data.tar.{gz,xz,lzma,bz2}
I should have been fixed in python-apt 0.9.3.4, which is available in jessie, but wheezy is stuck in 8.8 and I haven't found no official backport.
cee091c
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.
Thanks for the info. Do you think a hint in the docs would be helpful? Wheezy will be supported for two more years and I'm not sure if this an edge case or could be a common problem.
cee091c
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.
IMHO a hint in the docs would be extremely helpful to pure developers who do not have the chance to work in a DevOps environment, ie. developers with absolutely no idea how to debug this kind of problem with the service command and no available die hard linux nerd able to help, because they will read all the docs you have published, in my experience, which is BTW one of my favourite features of the java community heh I've been trying to dissuade my user from not using sbt-native-packager but on the other hand they "just want to start a jar service" so that seems to be an extremely common use-case. TBH I'm a completely newbie in the java ecosystem and I can't tell if it's really feasible for one package like sbt-native-packager to cover all sub-use cases or if it would be the right thing to do. After all, we can also install an init script from an ansible role.
Edge or common honnestly IDK, how much of your userbase have wheezy in production ? It seemed little to me when I wrote the above comment, but with your feedback now I tend to think there might be a ton or two. Java is, after all, extremely well supported on this platform which suggests that there might be a huge community of sbt-native-packager + wheezy + python-apt users. I've seen more and more companies encouraging java and ops/python teams to work together the last years, and so far I've had nothing but brilliant feedback, python/linux people (both communities are already unioning on ansible) learn from java people and vice-versa, so I'd say that this might become trendy, and I'd suspect there would be growing demand. Albeit one would say it's a bit unusual to consider support for such a case of using a modern tool (python-apt|ansible) on an old distro version to be a requirement for forward compatibility with the growing demand, but is this discussion going to the point where we're going to consider this as a regression ?!!
I do imagine that a lot if not most users with a mostly java-developer background, and not necessarily a linux background, who love the service script generated by sbt-native-package, like it's the case here (bonjour from Paris !).
cee091c
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.
Thank you for the detailed explanation.
TBH I have no really a clue what the main user group of native-packager is, but in doubt, I would rather add a hint in the docs. Would you like to make a small pull-request, adding the necessary information to fix this?
great to hear :) More languages and a broader background usually tend to improve code quality in all languages and create a more open mindset.
cee091c
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.
Always good to hear that our work is appreciated :)
cee091c
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.
Done in #811, thanks a heap for sharing some of your insight !
cee091c
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.
Thank you for sharing as well 😃 and helping to make this project again a bit more user friendly