Repository: linebender/resvg (language: rust)

Issue:
tarball not usable (vendor)
While updating the OpenShot flatpak (https://github.com/flathub/org.openshot.OpenShot) from 2.4.4 to 2.5.0, I wanted to update resvg from 0.6.1 to 0.9.0, but this failed with:

```
========================================================================
Building module resvg in /srv/buildbot/worker/build-x86_64-7/build/.flatpak-builder/build/resvg-1
========================================================================
]2;flatpak-builder: Building resvgFB: Running: tar xf /srv/buildbot/worker/build-x86_64-7/build/.flatpak-builder/downloads/669ac4fa4e63b8540f1a8c849f747db25bf870c07ccf0830de4f24209d0e017e/resvg-0.9.0.tar.xz --no-same-owner --strip-components=1 -J
]2;flatpak-builder: Installing resvgRunning: cargo build --verbose --release --frozen --manifest-path capi/Cargo.toml --features "qt-backend"
FB: Running: flatpak build --die-with-parent --env=FLATPAK_BUILDER_BUILDDIR=/run/build/resvg --nofilesystem=host --filesystem=/srv/buildbot/worker/build-x86_64-7/build/.flatpak-builder/build/resvg-1 --bind-mount=/run/build/resvg=/srv/buildbot/worker/build-x86_64-7/build/.flatpak-builder/build/resvg-1 --build-dir=/run/build/resvg --bind-mount=/run/ccache=/srv/buildbot/worker/build-x86_64-7/build/.flatpak-builder/ccache --unshare=network --env=SOURCE_DATE_EPOCH=1581713713 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' '--env=CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' '--env=LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed' --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin:/usr/lib/sdk/rust-stable/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=48 /srv/buildbot/worker/build-x86_64-7/build/.flatpak-builder/rofiles/rofiles-zi6OqL /bin/sh -c 'cargo build --verbose --release --frozen --manifest-path capi/Cargo.toml --features "qt-backend"'
error: failed to calculate checksum of: /run/build/resvg/vendor/fern/examples/cmd-program.rs
Caused by:
  No such file or directory (os error 2)
```
https://flathub.org/builds/#/builders/19/builds/1794

When unpacking the tarballs released after 0.6.1 I noticed that all of them (0.7.0, 0.8.0, 0.9.0) do not have the proper folder structure (e.g. `resvg-0.9.0/vendor/...`).


Discussion / hints:
What do you mean by "proper"? It's just a tar archive.
> What do you mean by "proper"? It's just a tar archive.

As I already said in https://github.com/RazrFalcon/resvg/issues/126#issuecomment-475384923, just download some tarball (Linux kernel, GNU, X11, GNOME, KDE) and you will see that putting all files in a separate directory is the expected standard.

Anyway, I can workaround this, but there seems to something gone wrong with vendoring the deps:
```
Running: cargo build --verbose --release --frozen --manifest-path capi/Cargo.toml --features "qt-backend"
error: failed to calculate checksum of: /run/build/resvg/vendor/fern/examples/pretty-colored.rs

Caused by:
  No such file or directory (os error 2)
```
I've reuploaded the vendored archive and published the script that creates it, in case you wanted to fix it by yourself.
Still doesn't work:
```
url: https://github.com/RazrFalcon/resvg/releases/download/v0.9.0/resvg-0.9.0.tar.xz
sha256: a2ecb02ffbb55b440246d3ba0cd0c42cfac5da92c867bc49c629c1276a9d6a49
```
```
Running: cargo build --verbose --release --frozen --manifest-path capi/Cargo.toml --features "qt-backend"
error: manifest path `capi/Cargo.toml` does not exist
```
Well, it clearly exist. 

Fix patch:
diff --git a/make-vendored.sh b/make-vendored.sh
index 8deb3a7bf..b6ef1f32a 100755
--- a/make-vendored.sh
+++ b/make-vendored.sh
@@ -15,16 +15,16 @@ cd ..
 
 env XZ_OPT="-9e" tar \
     --exclude=".git" \
-    --exclude=".github" \
     --exclude=".gitignore" \
     --exclude=".travis.yml" \
-    --exclude="./resvg-$VERSION/version-bump.md" \
-    --exclude="./resvg-$VERSION/docs" \
-    --exclude="./resvg-$VERSION/benches" \
-    --exclude="./resvg-$VERSION/examples" \
-    --exclude="./resvg-$VERSION/testing-tools" \
-    --exclude="./resvg-$VERSION/capi/qtests" \
-    -cJf resvg-"$VERSION".tar.xz ./resvg-"$VERSION"
+    --exclude="resvg-$VERSION/.github" \
+    --exclude="resvg-$VERSION/version-bump.md" \
+    --exclude="resvg-$VERSION/docs" \
+    --exclude="resvg-$VERSION/benches" \
+    --exclude="resvg-$VERSION/examples" \
+    --exclude="resvg-$VERSION/testing-tools" \
+    --exclude="resvg-$VERSION/capi/qtests" \
+    -cJf resvg-"$VERSION".tar.xz resvg-"$VERSION"
 
 # Clean up.
 rm -rf resvg-"$VERSION"


Test patch: