Sunday, June 30, 2019

Re: suricata, librsvg : set CARGO_HOME for upcoming lang/rust-1.36

On Sun, Jun 30, 2019 at 12:41:02PM +0200, Sebastien Marie wrote:
> Hi,
>
> I am working on updating lang/rust to 1.36.0
>
> The release ships a new version of cargo which will want to write a file
> in $HOME (a lock file to manage concurrent access on package cache).
>
> To avoid an error while acquiring package cache lock, CARGO_HOME should
> be defined to a directory writable by the build. The default value of
> CARGO_HOME is "$HOME/.cargo", so alternatively PORTHOME in the port
> could be set too.
>
> As i think it is less invasive to set CARGO_HOME, I followed this way.
>
> The following diff takes care of:
> - security/suricata : configure look for CARGO_HOME env var
> - x11/gnome/librsvg : set CARGO_HOME via MAKE_ENV
>
> Some others ports not using devel/cargo sets PORTHOME (hey firefox o/)
> so the problem doesn't occurs. And ports using devel/cargo modules
> already defines CARGO_HOME by default.
>
> One possible leftover is devel/meson where lang/rust is a TEST_DEPS. But
> it seems it is directly using rustc compiler and not cargo. So I assume
> it is fine.
>
> No package bump as it is a build setting that don't affect anything with
> rust-1.35 we have in port.
>
> Comments or OK ?
> --
> Sebastien Marie

Why not setting PORTHOME=${WRKDIST} by default for cargo ports?

>
> Index: security/suricata/Makefile
> ===================================================================
> RCS file: /cvs/ports/security/suricata/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- security/suricata/Makefile 3 May 2019 06:22:34 -0000 1.20
> +++ security/suricata/Makefile 30 Jun 2019 10:05:52 -0000
> @@ -49,7 +49,8 @@ CONFIGURE_STYLE = autoconf
> AUTOCONF_VERSION = 2.69
>
> CONFIGURE_ENV = ac_cv_path_HAVE_PDFLATEX= \
> - ac_cv_path_HAVE_GIT_CMD=
> + ac_cv_path_HAVE_GIT_CMD= \
> + CARGO_HOME=${WRKBUILD}/cargo-home
>
> CONFIGURE_ARGS = --disable-gccmarch-native \
> --enable-ipfw
> Index: x11/gnome/librsvg/Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/gnome/librsvg/Makefile,v
> retrieving revision 1.148
> diff -u -p -r1.148 Makefile
> --- x11/gnome/librsvg/Makefile 13 May 2019 22:47:45 -0000 1.148
> +++ x11/gnome/librsvg/Makefile 30 Jun 2019 07:25:33 -0000
> @@ -19,7 +19,8 @@ SHARED_LIBS += rsvg-2 39.
> GNOME_VERSION= ${STABLE_VERSION}
> BUILD_DEPENDS= lang/rust
> PKG_ARGS= -Dold=0 -Dstable=1
> -MAKE_ENV+= CARGO_BUILD_JOBS=${MAKE_JOBS}
> +MAKE_ENV+= CARGO_BUILD_JOBS=${MAKE_JOBS} \
> + CARGO_HOME=${WRKBUILD}/cargo-home
> .else
> ### old
> REVISION= 3
>

--
Antoine

No comments:

Post a Comment