Re: [new] net/arti

2022-09-03 Thread Sebastien Marie
On Sat, Sep 03, 2022 at 12:08:33PM +0200, Pascal Stumpf wrote:
> On Sat, 03 Sep 2022 12:04:30 +0200, Pascal Stumpf wrote:
> > Done, new tarball.
> 

I did more tests.

First, I will copte more crates in devel/cargo: arti is using crates with 
embedded C sources which could be statically used (lzma, openssl, zstd).

With the current framework, only zstd is built from source (instead of using 
archivers/zstd).

Index: ports/devel/cargo/cargo.port.mk
===
RCS file: /cvs/ports/devel/cargo/cargo.port.mk,v
retrieving revision 1.28
diff -u -p -r1.28 cargo.port.mk
--- ports/devel/cargo/cargo.port.mk 13 Mar 2022 13:05:52 -  1.28
+++ ports/devel/cargo/cargo.port.mk 3 Sep 2022 14:55:26 -
@@ -144,6 +144,16 @@ MODCARGO_post-extract += \
sed -i -e 's,find_library("lua5.2"),find_library("lua52"),' \
${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/build.rs ;
 
+.elif "${_cratename}" == "lzma-sys"
+MODCARGO_post-extract += \
+   ${ECHO_MSG} "[modcargo] Removing libsrc for ${_cratename}-${_cratever}" 
; \
+   rm -rf -- ${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/xz-[0-9]* ;
+
+.elif "${_cratename}" == "openssl-src"
+MODCARGO_post-extract += \
+   ${ECHO_MSG} "[modcargo] Removing libsrc for ${_cratename}-${_cratever}" 
; \
+   rm -rf -- ${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/openssl ;
+
 .elif "${_cratename}" == "openssl-sys"
 MODCARGO_post-extract += \
${ECHO_MSG} "[modcargo] Patching ${_cratename}-${_cratever} for 
supporting -current" ; \
@@ -179,6 +189,13 @@ MODCARGO_post-extract += \
${ECHO_MSG} "[modcargo] Removing libsrc for ${_cratename}-${_cratever}" 
; \
rm -rf -- 
${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/{src,makefile.cargo} ;
 
+.elif "${_cratename}" == "zstd-sys"
+MODCARGO_post-extract += \
+   ${ECHO_MSG} "[modcargo] Removing libsrc for ${_cratename}-${_cratever}" 
; \
+   rm -rf -- ${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/zstd ; \
+   ${ECHO_MSG} "[modcargo] Patching ${_cratename}-${_cratever} to use 
archivers/zstd" ; \
+   sed -i -e 's,^fn main() {,fn main() { 
println!("cargo:rustc-link-lib=zstd"); return;,' \
+   ${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/build.rs ;
 .endif
 .  endfor
 .endif


With that, your port needs LIB_DEPENDS + WANTLIB changes for archivers/zstd as 
it will be properly linked with zstd from ports.

Just an additionnal question: why NO_TEST=Yes ? A testsuite exists (and cargo 
module could use it), even if not very developed (only 14 tests, and seems to 
be 
related to configuration).


Once I commited cargo.port.mk changes, ok semarie@ for importing arti with 
LIB_DEPENDS + WANTLIB modification for archivers/zstd.

Thanks.
-- 
Sebastien Marie



Re: [new] net/arti

2022-09-03 Thread Pascal Stumpf
On Sat, 03 Sep 2022 12:04:30 +0200, Pascal Stumpf wrote:
> Done, new tarball.

Erm.  This one.

> On Sat, 3 Sep 2022 11:46:08 +0200, Sebastien Marie wrote:
> > On Sat, Sep 03, 2022 at 10:55:33AM +0200, Pascal Stumpf wrote:
> > > Arti is an implementation of Tor anonymity protocols, written in Rust.
> > > 
> > > It is intended to replace the C implementation at some point.  It's
> > > still missing features like bridges, transports and onion services, but
> > > it's usable for regular connections.  Here's the release announcement
> > > for version 1.0.0: https://blog.torproject.org/arti_100_released/
> > > 
> > > Not sure if we want to add a dedicated user and rc.d script yet.
> > 
> > some comments:
> > 
> > - crates.inc : the first line says "run: make modcargo-gen-crates-licenses"
> >   please include licenses information
> > 
> > - the "ring" crate is used. please add:
> > 
> > # ring-v0.16.20 does not support those archs
> > NOT_FOR_ARCHS = powerpc64 riscv64 sparc64
> > 
> >   ring doesn't support these archs for now, no need to try to build here
> > 
> > Thanks
> > -- 
> > Sebastien Marie
> 
>>> application/x-gzip attachment, name=arti.tgz


arti.tgz
Description: arti.tgz


Re: [new] net/arti

2022-09-03 Thread Pascal Stumpf
Done, new tarball.

On Sat, 3 Sep 2022 11:46:08 +0200, Sebastien Marie wrote:
> On Sat, Sep 03, 2022 at 10:55:33AM +0200, Pascal Stumpf wrote:
> > Arti is an implementation of Tor anonymity protocols, written in Rust.
> > 
> > It is intended to replace the C implementation at some point.  It's
> > still missing features like bridges, transports and onion services, but
> > it's usable for regular connections.  Here's the release announcement
> > for version 1.0.0: https://blog.torproject.org/arti_100_released/
> > 
> > Not sure if we want to add a dedicated user and rc.d script yet.
> 
> some comments:
> 
> - crates.inc : the first line says "run: make modcargo-gen-crates-licenses"
>   please include licenses information
> 
> - the "ring" crate is used. please add:
> 
>   # ring-v0.16.20 does not support those archs
>   NOT_FOR_ARCHS = powerpc64 riscv64 sparc64
> 
>   ring doesn't support these archs for now, no need to try to build here
> 
> Thanks
> -- 
> Sebastien Marie


arti.tgz
Description: arti.tgz


Re: [new] net/arti

2022-09-03 Thread Sebastien Marie
On Sat, Sep 03, 2022 at 10:55:33AM +0200, Pascal Stumpf wrote:
> Arti is an implementation of Tor anonymity protocols, written in Rust.
> 
> It is intended to replace the C implementation at some point.  It's
> still missing features like bridges, transports and onion services, but
> it's usable for regular connections.  Here's the release announcement
> for version 1.0.0: https://blog.torproject.org/arti_100_released/
> 
> Not sure if we want to add a dedicated user and rc.d script yet.

some comments:

- crates.inc : the first line says "run: make modcargo-gen-crates-licenses"
  please include licenses information

- the "ring" crate is used. please add:

# ring-v0.16.20 does not support those archs
NOT_FOR_ARCHS = powerpc64 riscv64 sparc64

  ring doesn't support these archs for now, no need to try to build here

Thanks
-- 
Sebastien Marie



[new] net/arti

2022-09-03 Thread Pascal Stumpf
Arti is an implementation of Tor anonymity protocols, written in Rust.

It is intended to replace the C implementation at some point.  It's
still missing features like bridges, transports and onion services, but
it's usable for regular connections.  Here's the release announcement
for version 1.0.0: https://blog.torproject.org/arti_100_released/

Not sure if we want to add a dedicated user and rc.d script yet.


arti.tgz
Description: arti.tgz