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

0.8.0: JDebPackaging tries to create symlink using 'ln' on windows #467

Closed
aparamonov opened this issue Jan 23, 2015 · 7 comments
Closed

Comments

@aparamonov
Copy link

I receive following error:

"ln": creating symbolic link `guide-menu-web' to `/usr/share/guide-menu-web/bin/
guide-menu-web': No such file or directory
java.lang.RuntimeException: Failed to symlink /usr/share/guide-menu-web/bin/guid
e-menu-web to D:\work\_projects\om-nom\site\web\target\guide-menu-web-1.0-SNAPSH
OT\usr\bin\guide-menu-web
        at scala.sys.package$.error(package.scala:27)
        at com.typesafe.sbt.packager.linux.LinuxSymlink$$anonfun$makeSymLinks$1.apply(LinuxPackageMapping.scala:79)
        at com.typesafe.sbt.packager.linux.LinuxSymlink$$anonfun$makeSymLinks$1.apply(LinuxPackageMapping.scala:58)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at com.typesafe.sbt.packager.linux.LinuxSymlink$.makeSymLinks(LinuxPackageMapping.scala:58)
        at com.typesafe.sbt.packager.debian.DebianPlugin$$anonfun$debianSettings$24.apply(DebianPlugin.scala:136)
        at com.typesafe.sbt.packager.debian.DebianPlugin$$anonfun$debianSettings$24.apply(DebianPlugin.scala:116)
        at scala.Function11$$anonfun$tupled$1.apply(Function11.scala:35)
        at scala.Function11$$anonfun$tupled$1.apply(Function11.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:235)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

If I add 'debianExplodedPackage in Debian := (target in Debian).value' to build.sbt, the error disappears.

@muuki88
Copy link
Contributor

muuki88 commented Jan 23, 2015

Can you create a small sample project to reproduce this?

@muuki88 muuki88 added the bug label Jan 23, 2015
@aparamonov
Copy link
Author

Please take a look at repository https://github.com/aparamonov/sbt-native-packager-467-issue

@stillyetanothergithubuser

I get the same error. The issue appears to be that the name of the link it's trying to create is a *nix fs style path. ("Failed to symlink /usr/share/emptyplay23/bin/emptyplay23 to C:\src12\emptyplay23\target\emptyplay23-.1\usr\bin\emptyplay23")

Digging into the code to see if I can see why. Here's the stacktrace though. (Using sbt-native-package 0.8.0 bundled with Play 2.3.7. I created an empty play-scala project added debian package info to build file and tried to create a debian package.)

[emptyplay23] $ last debian:debianExplodedPackage
java.lang.RuntimeException: Failed to symlink /usr/share/emptyplay23/bin/emptyplay23 to C:\src12\emptyplay23\target\emptyplay23-.1\usr\bin\emptyplay23
        at scala.sys.package$.error(package.scala:27)
        at com.typesafe.sbt.packager.linux.LinuxSymlink$$anonfun$makeSymLinks$1.apply(Linu
xPackageMapping.scala:79)
        at com.typesafe.sbt.packager.linux.LinuxSymlink$$anonfun$makeSymLinks$1.apply(Linu
xPackageMapping.scala:58)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at com.typesafe.sbt.packager.linux.LinuxSymlink$.makeSymLinks(LinuxPackageMapping.
scala:58)
        at com.typesafe.sbt.packager.debian.DebianPlugin$$anonfun$debianSettings$23.apply(
DebianPlugin.scala:129)
        at com.typesafe.sbt.packager.debian.DebianPlugin$$anonfun$debianSettings$23.apply(
DebianPlugin.scala:109)
        at scala.Function10$$anonfun$tupled$1.apply(Function10.scala:35)
        at scala.Function10$$anonfun$tupled$1.apply(Function10.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scal
a:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)

@muuki88 muuki88 removed the bug label Feb 8, 2015
@muuki88
Copy link
Contributor

muuki88 commented Feb 8, 2015

Sorry for realizing what is actually happening so late.
Native packager first goal is to make the packaging work on the platform
where it will execute afterwards (debian on debian machines, rpm on red hat machines,
exe on windows machines, etc..)

  1. You are trying to build a debian package on windows, so there's no guarantee it will work
  2. ln is only the first problem, you need dpkg tools installed as well.

BUT, there is a jdeb implementation, which can be activated with (in 0.8.0)

packageBin in Debian <<= debianJDebPackaging in Debian

You can also find this in the DebianPlugin docs

@muuki88 muuki88 closed this as completed Feb 8, 2015
@aparamonov
Copy link
Author

The issue is appeared when I use jdeb implementation (as you can see in the project by link above).
So the only problem with ln tool. Please, reopen the issue and get rid of usage of that tool on Windows platform.

@aparamonov
Copy link
Author

Debian package is created when I run 'sbt debian:packageBin' on that project on Mac OS.

@muuki88 muuki88 reopened this Feb 8, 2015
@muuki88
Copy link
Contributor

muuki88 commented Feb 22, 2015

I just had time to take a quick look at the example project. First of all you must not add the packageArchetype.java_server settings again in your build.sbt. This will override all play settings. Does this help?

@muuki88 muuki88 closed this as completed Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants