[Bug 266724] Mk/Uses/cargo.mk: _CARGO_GIT_SOURCES generates invalid WRKSRC with GitLab "tag"

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 30 Sep 2022 13:20:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266724

            Bug ID: 266724
           Summary: Mk/Uses/cargo.mk: _CARGO_GIT_SOURCES generates invalid
                    WRKSRC with GitLab "tag"
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: needs-patch
          Severity: Affects Only Me
          Priority: ---
         Component: Ports Framework
          Assignee: rust@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

As noticed in bug 242329 when automatic archive for a tag is downloaded full
Git hash is appended to the extracted directory with sources unless URL is
constructed in a certain way. For example,

https://gitlab.com/snakedye/snui/-/archive/v0.1.3.tar.gz?dummy=/snakedye-snui-v0.1.3_GL0.tar.gz

should be

https://gitlab.com/snakedye/snui/-/archive/v0.1.3/snui-v0.1.3.tar.gz?dummy=/snakedye-snui-v0.1.3_GL0.tar.gz

$ cd x11/salut
$ make cargo-crates-merge
$ make clean all
[...]
===>  Configuring for salut-0.2.3
===>   Cargo config:
find: /wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3: No such file or directory
find: /wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3: No such file or directory
find: /wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3: No such file or directory
[source.cargo]
directory =
'/wrkdirs/usr/ports/x11/salut/work/salut-9dc0ba82713515cf660b2fb75a411909fa1b4ae1/cargo-crates'
[source.crates-io]
replace-with = 'cargo'
[patch.'https://github.com/RazrFalcon/resvg.git']
resvg = { path =
'/wrkdirs/usr/ports/x11/salut/work/resvg-a739aef5d01360ec238c886bc50674f31458df00'
}
usvg = { path =
'/wrkdirs/usr/ports/x11/salut/work/resvg-a739aef5d01360ec238c886bc50674f31458df00/usvg'
}
[patch.'https://github.com/rust-x-bindings/xkbcommon-rs']
xkbcommon = { path =
'/wrkdirs/usr/ports/x11/salut/work/xkbcommon-rs-4e491bee1b850625ae077134901f89836edb6e81'
}
[patch.'https://gitlab.com/snakedye/snui.git']
snui = { path = '/wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3' }
snui-derive = { path = '/wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3' }
snui-wayland = { path = '/wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3' }
[patch.'https://github.com/Smithay/client-toolkit.git']
smithay-client-toolkit = { path =
'/wrkdirs/usr/ports/x11/salut/work/client-toolkit-87424f2cd10d50422d81ee0444e92becb45d43c4'
}
===>   Updating Cargo.lock
error: failed to load source for dependency `snui`

Caused by:
  Unable to update /wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3

Caused by:
  failed to read `/wrkdirs/usr/ports/x11/salut/work/snui-v0.1.3/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
*** Error code 101

Stop.
make: stopped in /usr/ports/x11/salut

-- 
You are receiving this mail because:
You are on the CC list for the bug.