Building a port with poudriere that depends on a cargo crate that needs net access

Adam Jimerson vendion at gmail.com
Wed Feb 10 13:24:50 UTC 2021


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20210210/a48c6a6e/attachment.sig>


More information about the freebsd-ports mailing list