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

setting for scriplets in rpm files should be Seq[String] instead of Option[String] #269

Closed
Kreinoee opened this issue Jun 5, 2014 · 2 comments

Comments

@Kreinoee
Copy link

Kreinoee commented Jun 5, 2014

Inspired from: #219

I think that is more likely that users want too add more commands to scriptlets, than to replace them entirely. This is extra proplematic because predefined settings like packageArchetype.java_server adds some scriplets, that is pretty easy for the user to override by mistake.

Currently ekstra scriplet commands can be added like this:

rpmPre <<= (rpmPre, linuxScriptReplacements) apply { (pre, replacements) =>
      Some(pre.map(_ + "\n").getOrElse("") + "Your new content\n")
}

but it is pretty complex and not very intuitive. I think most sbt users would expect to do this:
rpmPre += "some usefull shell command"

@muuki88
Copy link
Contributor

muuki88 commented Jun 5, 2014

I think this is a pretty decent approach. IMHO we should extend this to the debian packaging as well.
However I like the approach where you can provide a complete control script. So we may also add
an option controlScriptStrategy (or something like that), with values like file, settings, merge and fail.

This would makes things a lot easier in the debian package, where we add chown and useradd statements with a lot of action. It would be just postInst += "....".

@muuki88
Copy link
Contributor

muuki88 commented Sep 12, 2014

I will start this after #348 is merged. If you use the java_server archetype you can already add stuff the rpm scriptlets via files. Just put them in src/rpm/ - postinst postun preinst preun

@muuki88 muuki88 closed this as completed Feb 28, 2016
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