Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 2021 08:24:46 -0500
From:      Adam Jimerson <vendion@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   Building a port with poudriere that depends on a cargo crate that needs net access
Message-ID:  <1652337.MsCH1bHPGx@heimdall>

next in thread | raw e-mail | index | archive | help
--nextPart1978749.4WAli8B44Z
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"; protected-headers="v1"
From: Adam Jimerson <vendion@gmail.com>
To: freebsd-ports@freebsd.org
Subject: Building a port with poudriere that depends on a cargo crate that needs net access
Date: Wed, 10 Feb 2021 08:24:27 -0500
Message-ID: <1652337.MsCH1bHPGx@heimdall>

I'm trying to make a port that depends on a number of cargo crates, both 
direct and indirect dependencies, one of these crates needs network access to 
build. The crate in question is psl (https://crates.io/crates/psl).

When building the port with `poudriere testport` the build fails with the 
following errors:

error: proc-macro derive panicked                                                                                                                                                                                                              
 --> /wrkdirs/usr/ports/www/py-adblock/work-py37/python-adblock-0.4.2/cargo-
crates/psl-0.4.1/src/list.rs:6:10                                                                                                                                  
  |                                                                                                                                                                                                                                            
6 | #[derive(Psl, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, 
Default)]                                                                                                                                                          
  |          ^^^                                                                                                                                                                                                                               
  |                                                                                                                                                                                                                                            
  = help: message: failed to download the list: failed to lookup address 
information: hostname nor servname provided, or not known                                                                                                             
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                               
error[E0599]: no method named `domain` found for struct `List` in the current 
scope                                                                                                                                                            
  --> /wrkdirs/usr/ports/www/py-adblock/work-py37/python-adblock-0.4.2/cargo-
crates/psl-0.4.1/src/list.rs:28:20                                                                                                                                
   |                                                                                                                                                                                                                                           
7  | pub struct List;
   | ---------------- method `domain` not found for this
...
28 |         match List.domain(input) {
   |                    ^^^^^^ method not found in `List`
   |
   = help: items from traits can only be used if the trait is implemented and 
in scope
note: `Psl` defines an item `domain`, perhaps you need to implement it
  --> /wrkdirs/usr/ports/www/py-adblock/work-py37/python-adblock-0.4.2/cargo-
crates/psl-0.4.1/src/lib.rs:48:1
   |
48 | pub trait Psl {
   | ^^^^^^^^^^^^^


error[E0599]: no method named `suffix` found for struct `List` in the current 
scope
  --> /wrkdirs/usr/ports/www/py-adblock/work-py37/python-adblock-0.4.2/cargo-
crates/psl-0.4.1/src/list.rs:51:20
   |
7  | pub struct List;
   | ---------------- method `suffix` not found for this
...
51 |         match List.suffix(input) {
   |                    ^^^^^^ method not found in `List`
   |
   = help: items from traits can only be used if the trait is implemented and 
in scope
note: `Psl` defines an item `suffix`, perhaps you need to implement it
  --> /wrkdirs/usr/ports/www/py-adblock/work-py37/python-adblock-0.4.2/cargo-
crates/psl-0.4.1/src/lib.rs:48:1
   |
48 | pub trait Psl {
   | ^^^^^^^^^^^^^


error: aborting due to 3 previous errors

I'm guessing the first error "failed to download the list: failed to lookup 
address information: hostname nor servname provided, or not known" is the 
source of the other 2 errors.

If I enter the build jail and run the build command directly from /wrkdirs/
usr/ports/www/py-adblock/work-py37/python-adblock-0.4.2 the crate builds 
without issues which seems to imply that poudriere's testport command is 
blocking the network request (probably for a good reason).

I'm sure something like this has come up before, but is there a good way to 
resolve this? I tried looking at the source code for the psl crate to see if 
it is something I can add in via a patch and avoid the network call but i 
can't see where the request is made.
--nextPart1978749.4WAli8B44Z
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQEzBAABCAAdFiEELLlB4D3dJQL6YIqWtmZSyNpTGkkFAmAj3osACgkQtmZSyNpT
GkkSMAf7BZ4+u26FGe1Kun9PKfD2HaPXVpY9LTgIfenhVWMyLe4hAEady3P8vGws
3zflg4aj6DbUOsRTJv8YyfWI2LpPTIcf0unDA3hvSr0DuiiLtidtnzkWN7tyzDR8
qHPFnY8xmZjeAIztXndl0wTRWsd/ST65WaCgXfZR3VJOKX6+idtl6qVEGNaB5sW5
HcsP93HbzoUmOXQTbZ1PJ/Vj4aIIIwvZX4vttKPkoU5hWVv+9aSP4ju+YKQTdo/r
Rw/JmK36L8KZgQLmuUjK1v7Vam1pR8HxncpEXY20l34IraMNtWcrGH571u455ccL
vr3VIHl5e27imYd3aPh/IdN3PdNzPQ==
=TV9k
-----END PGP SIGNATURE-----

--nextPart1978749.4WAli8B44Z--






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1652337.MsCH1bHPGx>