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

Wrong permissions for /usr/share/app_name fixed #225

Merged
merged 1 commit into from
Apr 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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