Skip to content

Commit

Permalink
#267 Fix debian pacakge warnings
Browse files Browse the repository at this point in the history
The following warnings have been fixed:
 - init.d-script-does-not-implement-required-option
 - no-copyright-file
 - non-etc-file-marked-as-conffile
 - systemd-service-file-outside-lib
 - executable-not-elf-or-script
 - extended-description-line-too-long
  • Loading branch information
To-om committed Jul 24, 2017
1 parent 81bf6f7 commit 2439db5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 58 deletions.
27 changes: 18 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ lazy val rpmPackageRelease = (project in file("package/rpm-release"))
))
)


Release.releaseVersionUIFile := baseDirectory.value / "ui" / "package.json"
Release.changelogFile := baseDirectory.value / "CHANGELOG.md"

Expand Down Expand Up @@ -79,31 +80,39 @@ mappings in Universal ~= {
maintainer := "TheHive Project <[email protected]>"
packageSummary := "Scalable, Open Source and Free Security Incident Response Solutions"
packageDescription :=
"""TheHive is a scalable 3-in-1 open source and free security incident response platform designed to make life easier
| for SOCs, CSIRTs, CERTs and any information security practitioner dealing with security incidents that need to be
| investigated and acted upon swiftly.""".stripMargin
"""TheHive is a scalable 3-in-1 open source and free security incident response
| platform designed to make life easier for SOCs, CSIRTs, CERTs and any
| information security practitioner dealing with security incidents that need to
| be investigated and acted upon swiftly.""".stripMargin
defaultLinuxInstallLocation := "/opt"
linuxPackageMappings ~= {
_.map { pm =>
val mappings = pm.mappings.filterNot {
case (_, path) => path.startsWith("/opt/thehive/package") || path.startsWith("/opt/thehive/conf")
}
com.typesafe.sbt.packager.linux.LinuxPackageMapping(mappings, pm.fileData).withConfig()
} :+ packageMapping(
file("package/thehive.service") -> "/etc/systemd/system/thehive.service",
com.typesafe.sbt.packager.linux.LinuxPackageMapping(mappings, pm.fileData)
}
}
linuxPackageMappings ++= Seq(
packageMapping(
file("package/thehive.service") -> "/usr/lib/systemd/system/thehive.service"
).withPerms("644"),
packageMapping(
file("package/thehive.conf") -> "/etc/init/thehive.conf",
file("package/thehive") -> "/etc/init.d/thehive",
file("conf/application.sample") -> "/etc/thehive/application.conf",
file("conf/logback.xml") -> "/etc/thehive/logback.xml"
).withConfig()
}
).withPerms("644").withConfig(),
packageMapping(
file("package/thehive") -> "/etc/init.d/thehive"
).withPerms("755").withConfig())

packageBin := {
(packageBin in Universal).value
(packageBin in Debian).value
(packageBin in Rpm).value
}
// DEB //
linuxPackageMappings in Debian += packageMapping(file("LICENSE") -> "/usr/share/doc/thehive/copyright").withPerms("644")
version in Debian := version.value + "-1"
debianPackageRecommends := Seq("elasticsearch")
debianPackageDependencies += "openjdk-8-jre-headless"
Expand Down
5 changes: 5 additions & 0 deletions package/thehive
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ case "$1" in
start
;;

force-reload)
stop
start
;;

*)
log_action_msg "Usage: /etc/init.d/thehive {start|stop|restart|status}" || true
exit 1
Expand Down
49 changes: 0 additions & 49 deletions package/thehive.conf-perso

This file was deleted.

0 comments on commit 2439db5

Please sign in to comment.