From 2d525f867f7839be582c36d2a6d92ee194287447 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 13 Jan 2016 10:31:07 -0500 Subject: [PATCH 1/4] fix regression where .deb ended up with wrong name on server this happened when we upgraded sbt-native-packager from 0.6.x to 1.0.x; the new version calculates this differently --- project/ScalaDist.scala | 10 +++++++++- project/Unix.scala | 5 +---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/project/ScalaDist.scala b/project/ScalaDist.scala index 52a3d9a79..d86fea9f6 100644 --- a/project/ScalaDist.scala +++ b/project/ScalaDist.scala @@ -40,7 +40,15 @@ object ScalaDist { mappings in upload += uploadMapping(packageZipTarball in UniversalDocs).value, mappings in upload += uploadMapping(packageXzTarball in UniversalDocs).value, mappings in upload += uploadMapping(packageBin in Rpm).value, - mappings in upload += uploadMapping(packageBin in Debian).value + // Debian needs special handling because the value sbt-native-packager + // gives us for `packageBin in Debian` (coming from the archiveFilename + // method) includes the debian version and arch information, + // which we historically have not included. I don't see a way to + // override the filename on disk, so we re-map at upload time + mappings in upload += Def.task { + (packageBin in Debian).value -> + s"scala/${version.value}/${(name in Debian).value}-${version.value}.deb" + }.value ) def settings: Seq[Setting[_]] = diff --git a/project/Unix.scala b/project/Unix.scala index 670c90cdc..4a9e16fb6 100644 --- a/project/Unix.scala +++ b/project/Unix.scala @@ -93,10 +93,7 @@ object Unix { linuxPackageMappings in Debian += (packageMapping( (sourceDirectory.value / "debian" / "changelog") -> "/usr/share/doc/scala/changelog.gz" - ) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs(), - - // Hack so we use regular version, rather than debian version. - target in Debian := target.value / s"${(name in Debian).value}-${version.value}" + ) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs() ) } From 506fd28b245a509c7faf0214c6368edee0b87fd2 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 13 Jan 2016 09:53:57 -0500 Subject: [PATCH 2/4] remove commented-out code --- project/Unix.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/project/Unix.scala b/project/Unix.scala index 4a9e16fb6..4ace418a4 100644 --- a/project/Unix.scala +++ b/project/Unix.scala @@ -89,7 +89,6 @@ object Unix { // Debian Specific name in Debian := "scala", debianPackageDependencies += "java6-runtime-headless", - // debianPackageDependencies += "libjansi-java", linuxPackageMappings in Debian += (packageMapping( (sourceDirectory.value / "debian" / "changelog") -> "/usr/share/doc/scala/changelog.gz" From 03bde36c7d4216cf55f5e874c197a71f5d69e83d Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 13 Jan 2016 10:31:54 -0500 Subject: [PATCH 3/4] enable more warnings when compiling sbt build because warnings are a good thing & we want to see them --- project/plugins.sbt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4ab1b9843..35421a3fa 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,5 @@ +scalacOptions ++= Seq("-deprecation", "-feature", "-Xlint") + addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4") addSbtPlugin("com.typesafe.sbt" % "sbt-s3" % "0.8") From 7b9b52c1d40e36550f7ca06238601a64263a5ccd Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 13 Jan 2016 10:33:26 -0500 Subject: [PATCH 4/4] make a language.postfixOps warning go away --- project/Unix.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Unix.scala b/project/Unix.scala index 4ace418a4..a65baecee 100644 --- a/project/Unix.scala +++ b/project/Unix.scala @@ -92,7 +92,7 @@ object Unix { linuxPackageMappings in Debian += (packageMapping( (sourceDirectory.value / "debian" / "changelog") -> "/usr/share/doc/scala/changelog.gz" - ) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs() + ).withUser("root").withGroup("root").withPerms("0644").gzipped).asDocs() ) }