Skip to content
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

description in upstart config should be taken from packageDescription not from packageSummary #384

Closed
kretes opened this issue Oct 23, 2014 · 4 comments

Comments

@kretes
Copy link

kretes commented Oct 23, 2014

having

com.typesafe.sbt.packager.debian.Keys.packageDescription in SbtNativePackager.Linux := "descr",
com.typesafe.sbt.packager.debian.Keys.packageSummary in SbtNativePackager.Linux := "sum",

when I run debian:packageBin I get in /etc/init/package.conf

which contains:

description "sum"

which is bad, as I expected it to be 'descr'

The problem is more important than it seems, as packageSummary is not required, but when it is unspecified - file /etc/init/my-package.conf is invalid, and the service is not registered.

init-checkconf /etc/init/my-package.conf 
ERROR: File /etc/init/my-package.conf: syntax invalid:
init:my-package.conf:3: Expected token
@muuki88 muuki88 added the bug label Oct 23, 2014
@muuki88
Copy link
Contributor

muuki88 commented Oct 23, 2014

I think the main point is that a summary should be a one-liner and the description can be multline.
This was the main reason to use the packageSummary for the description field in upstart. What would you suggest?

@kretes
Copy link
Author

kretes commented Oct 24, 2014

Ok, we should at least require that, as it is required to provide description. when I do not have it - I get

 Stack trace suppressed: run last debian:debianControlFile for the full output.
[error] (debian:debianControlFile) packageDescription in Debian cannot be empty. Use
[error]                  packageDescription in Debian := "My package Description"

so - let's maybe add same rule here?

@kretes
Copy link
Author

kretes commented Oct 24, 2014

BTW - why are there multiple 'keys classes', e.g

com.typesafe.sbt.packager.debian.Keys
com.typesafe.sbt.packager.linux.Keys

? shouldn't it be that keys are not duplicated , but we control the value by specifying sbt scope?

@muuki88
Copy link
Contributor

muuki88 commented Oct 24, 2014

This check is done by dpkg-build. So what we need would be a warning if you are using
a server loader that requires a packageSummary. That's actually a bigger tasks as we don't have any validation task at the moment.

The keys are the same. There is a common trait which gets extended. Just use

import NativePackagerKeys._

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants