scala-dist icon indicating copy to clipboard operation
scala-dist copied to clipboard

deb packages aren't getting their data gzipped anymore

Open hrhino opened this issue 7 years ago • 11 comments

hhoughton:Downloads hhoughton$ for i in 3 4; do ar -t scala-2.13.0-M$i.deb; echo; done
debian-binary
control.tar.gz
data.tar.gz

debian-binary
control.tar.gz
data.tar

Probably caused by #180. Newer versions of sbt-native-packager pass -Znone to dpkg, because "packages are largely JARs, which are already compressed". However, the packaged scaladoc has nearly 500MB (uncompressed) of docs, which benefit greatly from compression.

I'll double-check that that's the problem, but it seems the most likely.

Thanks to @Glavo for noticing.

hrhino avatar May 15 '18 16:05 hrhino

ha, nice catch @Glavo

SethTisue avatar May 15 '18 16:05 SethTisue

Workaround with debianNativeBuildOptions in Debian -= "-Znone", perhaps?

dwijnand avatar May 15 '18 18:05 dwijnand

Yeah, that's what I was going to do.

I think I'd call that the "fix" rather than a "workaround", though :P

hrhino avatar May 15 '18 18:05 hrhino

Why is the packaged scaladoc not compressed? As I understand it you have to opt-in to do that: https://docs.oracle.com/javase/tutorial/deployment/jar/build.html

dwijnand avatar May 15 '18 18:05 dwijnand

so I did that (the -= "-Znone"), and show debian:packageBin::debianNativeBuildOptions tells me that that's not getting passed, but I'm still not getting anything built. I also can't find the older version of sbt-native-packager anywhere, so I'm a little stumped on how to try this out.

hrhino avatar May 15 '18 18:05 hrhino

The scaladoc isn't packaged in a jar for debian; it's exploded into /usr/share/doc before making the .deb file.

hrhino avatar May 15 '18 18:05 hrhino

I also can't find the older version of sbt-native-packager anywhere, so I'm a little stumped on how to try this out.

I can see it in: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/1.0.6/jars/

dwijnand avatar May 15 '18 18:05 dwijnand

The scaladoc isn't packaged in a jar for debian; it's exploded into /usr/share/doc before making the .deb file.

I see!

dwijnand avatar May 15 '18 18:05 dwijnand

I can see it in: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/1.0.6/jars

yep, it's there. Dunno why sbt isn't looking there by default, though... (it presumably resolved earlier without any extra resolvers.)

hrhino avatar May 15 '18 19:05 hrhino

That's where it should be resolving from, out the box. So not sure what's up, without digging into it more.

dwijnand avatar May 15 '18 19:05 dwijnand

I'm trying to upgrade scala-dist to the latest versions of SBT and plugins, could be a good time to revisit this.

#215

retronym avatar Jun 15 '21 02:06 retronym