Hi Nilesh,

On 06/10/2025 17:46, Nilesh Patra wrote:
Hi,

I was trying to update snowflake [1]. This has a change in import path, which I 
added in [2].

This now has 2 import paths. riseup-vpn is a reverse-dependency of this 
package. When I tried
to build reverse-dependency (everything locally), I am getting:

| # 0xacab.org/leap/bitmask-vpn/pkg/snowflake/lib
| src/0xacab.org/leap/bitmask-vpn/pkg/snowflake/lib/turbotunnel.go:10:2: cannot find 
package "git.torproject.org/
| pluggable-transports/snowflake.git/common/encapsulation" in any of:
|       
/build/reproducible-path/riseup-vpn-0.25.8+ds2/_build/src/0xacab.org/leap/bitmask-vpn/vendor/
| git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation 
(vendor tree)

While this directory _is_ present:

| $ dpkg -c golang-snowflake-dev_2.10.1-1_all.deb | grep encapsulation
| drwxr-xr-x root/root         0 2024-12-07 00:00 
./usr/share/gocode/src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/encapsulation/
| -rw-r--r-- root/root      6700 2024-12-07 00:00 
./usr/share/gocode/src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/encapsulation/encapsulation.go
|-rw-r--r-- root/root     12313 2024-12-07 00:00 
./usr/share/gocode/src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/encapsulation/encapsulation_test.go

Could someone help me understand as to why the other import path is not taken 
up?

The documentation of dh_golang [3] indicates that only the *first* import path is used:
"DH_GOPKG" is automatically set to the value of the first import path of the 
"XS-Go-Import-Path" "debian/control" field, which can contain several comma-separated 
import paths.

In your case, riseup-vpn is looking for the Go package "git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation", whereas the snowflake one provides only "gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/encapsulation/", which is a different import path.

Maybe dh_golang should instead create symlinks for all the other listed import paths targeting the first one?

[1] https://salsa.debian.org/pkg-privacy-team/snowflake
[2] 
https://salsa.debian.org/pkg-privacy-team/snowflake/-/commit/e594bcde56436ac9dc9cc3aeb96eefdbfe4945a0

[3] https://manpages.debian.org/bookworm/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html#ENVIRONMENT_VARIABLES

--
Nicolas Peugnet

Reply via email to