Skip to content

Commit

Permalink
wrong permissions for /usr/share/app_name fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kardapoltsev committed Apr 11, 2014
1 parent 27d5b4c commit 6a10cdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ object JavaAppPackaging {
s <- script.toSeq
} yield s -> ("bin/" + name + ".bat")
},
linuxPackageMappings in Debian <+= (normalizedName, defaultLinuxInstallLocation, target in Debian, daemonUser in Linux, daemonGroup in Linux) map {
(name, installLocation, target, user, group) =>
linuxPackageMappings in Debian <+= (normalizedName, defaultLinuxInstallLocation, target in Debian) map {
(name, installLocation, target) =>
// create empty var/log directory
val d = target / installLocation
d.mkdirs()
LinuxPackageMapping(Seq(d -> (installLocation + "/" + name)), LinuxFileMetaData(user, group))
LinuxPackageMapping(Seq(d -> (installLocation + "/" + name)), LinuxFileMetaData())
})

def makeRelativeClasspathNames(mappings: Seq[(File, String)]): Seq[String] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ object JavaServerAppPackaging {
makeMaintainerScript(builder.startScript, Some(template))(tmpDir, loader, replacements, builder)
},
linuxPackageMappings in Debian <++= (normalizedName, linuxMakeStartScript in Debian, serverLoading in Debian) map startScriptMapping,
// TODO should we specify daemonGroup in configs?

// === Maintainer scripts ===
debianMakePreinstScript <<= (target in Universal, serverLoading in Debian, linuxScriptReplacements, linuxJavaAppStartScriptBuilder in Debian) map makeMaintainerScript(Preinst),
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/debian/daemon-user-deb/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ TaskKey[Unit]("check-control-files") <<= (target, streams) map { (target, out) =
assert(!(postinst contains "chown debian-test:daemongroup"), "postinst contains wrong user: \n" + postinst)
assert(!(postinst contains "chown daemonuser:debian-test"), "postinst contains wrong group: \n" + postinst)
assert(!(postinst contains "chown debian-test:debian-test"), "postinst contains wrong user and group: \n" + postinst)
assert(!(postinst contains "chown daemonuser:daemongroup /usr/share/debian-test"), "postinst contains chown /usr/share/app_name: \n" + postinst)
out.log.success("Successfully tested upstart control files")
()
}
Expand Down

0 comments on commit 6a10cdd

Please sign in to comment.