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

1.0.5 regression: tarball tasks run tar with incorrect options (namely, none) #731

Closed
SethTisue opened this issue Jan 21, 2016 · 1 comment
Labels
bug universal Zip, tar.gz, tgz and bash issues

Comments

@SethTisue
Copy link
Member

after we upgraded https://github.com/scala/scala-dist from sbt-native-packager 1.0.4 to 1.0.6, the universal-docs:packageXzTarball and universal-docs:packageZipTarball tasks stopped working correctly, e.g. at https://scala-ci.typesafe.com/job/scala-2.11.x-release-package-unix/356/console where we see:

java.lang.RuntimeException: Error tarballing /home/jenkins/workspace/scala-2.11.x-release-package-unix/target/universal-docs/scala-docs-2.11.8-f6bd712-nightly.txz. Exit code: 2

by ssh'ing in to the CI server and running the tasks manually I was able to get more informative error logs:

> universal-docs:packageXzTarball,
...
Running with tar /tmp/sbt_7bbb8416/scala-docs-2.11.7.tar scala-2.11.7
tar: Old option 'b' requires an argument.
Try 'tar --help' or 'tar --usage' for more information.
[trace] Stack trace suppressed: run last universal-docs:packageXzTarball for the full output.
[error] (universal-docs:packageXzTarball) Error tarballing /home/jenkins/workspace/scala-2.11.x-release-package-unix/target/universal-docs/scala-docs-2.11.7.txz. Exit code: 2
> universal-docs:packageZipTarball
Running with tar /tmp/sbt_1205a627/scala-docs-2.11.7.tar scala-2.11.7
tar: invalid option -- '/'
Try 'tar --help' or 'tar --usage' for more information.
[trace] Stack trace suppressed: run last universal-docs:packageZipTarball for the full output.
[error] (universal-docs:packageZipTarball) Error tarballing /home/jenkins/workspace/scala-2.11.x-release-package-unix/target/universal-docs/scala-docs-2.11.7.tgz. Exit code: 64

I believe the culprit is #666. the Running with lines above are actually complete invocations of tar, they just don't look like it because there are no flags. but yeah, it really is running tar without any flags such as -pcvf.

as for why, well, this key is empty:

> universal-docs:packageXzTarball::universalArchiveOptions
[info] List()

because since #666, in the sources we see universalArchiveOptions in packageKey := Nil, should be Seq("-pcvf") IMO (or perhaps include --force-local too, I see in other PRs there's been back-and-forth on that that I had difficulty following)

there's a defaultUniversalArchiveOptions in the sources that has the right value, but for some reason it isn't taking effect.

in scala/scala-dist#159 I worked around the problem by adding these settings:

universalArchiveOptions in (UniversalDocs, packageZipTarball) := Seq("--force-local", "-pcvf")
universalArchiveOptions in (UniversalDocs, packageXzTarball) := Seq("--force-local", "-pcvf")
@muuki88
Copy link
Contributor

muuki88 commented Jan 22, 2016

Thanks for the detailed description @SethTisue
We forgot to add the default options for docs packaging. Will fix this on the WE.

@muuki88 muuki88 added bug universal Zip, tar.gz, tgz and bash issues labels Jan 23, 2016
muuki88 added a commit that referenced this issue Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug universal Zip, tar.gz, tgz and bash issues
Projects
None yet
Development

No branches or pull requests

2 participants