Skip to content

Commit

Permalink
Merge pull request #323 from kardapoltsev/wip/jdeb-permissions
Browse files Browse the repository at this point in the history
FIX #322 adding permissions to jdeb packaging
  • Loading branch information
muuki88 committed Aug 16, 2014
2 parents 1f78f2a + 75583fe commit e09d65a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ trait JDebPackaging { this: DebianPlugin with linux.LinuxPlugin =>
name, version, target, s) =>
s.log.info("Building debian package with java based implementation 'jdeb'")
val console = new JDebConsole(s.log)

val debianFile = target.getParentFile / "%s_%s_all.deb".format(name, version)
val debMaker = new DebMaker(console,
fileAndDirectoryProducers(mappings, target) ++ linkProducers(symlinks),
Expand All @@ -68,9 +67,11 @@ trait JDebPackaging { this: DebianPlugin with linux.LinuxPlugin =>
val (dirs, files) = paths.partition(_._1.isDirectory)
paths map {
case (path, name) if path.isDirectory =>
new DataProducerDirectory(target / name, null, Array("**"), null)
val permMapper = new PermMapper(-1, -1, perms.user, perms.group, null, perms.permissions, -1, null)
new DataProducerDirectory(target / name, null, Array("**"), Array(permMapper))
case (path, name) =>
new DataProducerFile(target / name, name, null, null, null)
val permMapper = new PermMapper(-1, -1, perms.user, perms.group, perms.permissions, null, -1, null)
new DataProducerFile(target / name, name, null, null, Array(permMapper))
}
}.flatten

Expand Down
2 changes: 1 addition & 1 deletion test-project/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.1
sbt.version=0.13.5
2 changes: 1 addition & 1 deletion test-project/src/debian/DEBIAN/postrm
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "removed ${{name}}-${{version}} from ${{author}}"
echo "removed ${{app_name}} from ${{author}}"
2 changes: 1 addition & 1 deletion test-project/src/debian/DEBIAN/preinst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "installing ${{name}}-${{version}} from ${{author}}"
echo "installing ${{app_name}} from ${{author}}"

0 comments on commit e09d65a

Please sign in to comment.