sbt/sbt-native-packager

Sbt-native-packager doesn't follow folders symlinks during packageZipTarball

Open

#1,134 opened on Jun 19, 2018

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Scala (439 forks)batch import
bughelp wanteduniversal

Repository metrics

Stars
 (1,593 stars)
PR merge metrics
 (Avg merge 17d 18h) (4 merged PRs in 30d)

Description

Hi! I have an universal folder in resources that contains conf folder:

└── universal
    ├── conf
    │   ├── akka.conf -> ../../main/resources/akka.conf
    │   ├── common.conf -> ../../main/resources/common.conf
    │   ├── local -> ../../main/resources/local/
    │   ├── logback-appenders.xml -> ../../main/resources/logback-appenders.xml
    │   ├── mailer.conf -> ../../main/resources/mailer.conf
    │   ├── mongo.conf -> ../../main/resources/mongo.conf
    │   ├── production -> ../../main/resources/production/
    │   ├── spray.conf -> ../../main/resources/spray.conf
    │   └── staging -> ../../main/resources/staging/
    └── start.sh

As you can see, the most of the files are just symlinks to other place. The problem is that when I build package, all files are copied, but folders are copied without their content (not recursively). So in final build I have something like that:

├── conf
│   ├── akka.conf
│   ├── common.conf
│   ├── local <-- empty!
│   ├── logback-appenders.xml
│   ├── mailer.conf
│   ├── mongo.conf
│   ├── production <-- empty!
│   ├── spray.conf
│   └── staging <-- empty!

If I have simple folders (not a symlink) it works fine. So seems like it doesn't follow symlinks till the end.

Expected behaviour

universal:packageZipTarball should copy all reachable files recursively (including symlinks)

Actual behaviour

universal:packageZipTarball copies symlink as an empty directory

Information

  • What sbt-native-packager are you using: 1.3.5
  • What sbt version: 1.1.6
  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian ): MacOS 10.13.5
  • What package are you building (e.g. docker, rpm, ...): tar
  • What version has your build tool (find out with e.g. rpm --version): bsdtar 2.8.3 - libarchive 2.8.3

Contributor guide