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

Added Template Directories for Debian package #54 #61

Closed
wants to merge 1 commit into from
Closed

Added Template Directories for Debian package #54 #61

wants to merge 1 commit into from

Conversation

muuki88
Copy link
Contributor

@muuki88 muuki88 commented Nov 4, 2013

Template directories can now be created via

debianMakeTemplateDirectories in Debian += packageTemplateMapping(
    "/var/log/" + name.value,
    "/etc/" + name.value
)

Sorry for some changes, the IDE formatting kicked in :/

@jsuereth
Copy link
Member

jsuereth commented Nov 5, 2013

Hmm... I think we may want to do a few things here:

  1. Remove this hack: https://github.com/muuki88/sbt-native-packager/blob/468c926fc3ce83a8b43c5dabcbafa52725a23f8e/src/main/scala/com/typesafe/sbt/packager/debian/DebianPlugin.scala#L146
  2. Instead of creating a new mechanism for empty directories, why not just throw those in LinuxPackageMappings? If we fix the kludge above, they should show up when copying, and you could also have those same empty directories for RPMs. We can alter the defaults to discover empty directories in src/debian or src/linux and pull them in as templates. Maybe a flag to turn the autodiscovery off too.
  3. Add a mechanism to chown files (as you reported elsewhere). This isn't needed for RPMs (where you can write ownership to the spec file), but may be needed for debian. The issue is, using the virtual root, I'm not sure how to get all the ownership information correct. You don't want to just do a chown because the UIDs won't match up when installed, right?

What do you think of that plan?

@muuki88
Copy link
Contributor Author

muuki88 commented Nov 5, 2013

  1. Yep. This is surely a good plan. Have to get my head arround this one :)
  2. I tried, but failed with my first attempt. When i specify a packageMapping like this
packageMapping(
    file("/var/log") -> "/var/log"
)

I didn't worked out. Or should it?
3. I think this is a bit tricky. Maybe I'll take a look at similar plugins and take a look at their strategy. However the UIDs will be a problem. Maybe we should use this instead of the username?

@jsuereth
Copy link
Member

jsuereth commented Nov 8, 2013

Closed in favor of alternative mechanism in #63

@jsuereth jsuereth closed this Nov 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants