Sunday, September 08, 2019

devel/cargo module: modcargo-metadata adjustement

Hi,

I found that when using PORTS_PRIVSEP, "make modcargo-metadata" is
broken. It tries to modify build files (regenerating checksum control
file) as normal user instead of using the privsep user.

The following diff take care of that:
- create an internal _modcargo-metadata target to regen metadata
- invoke the internal target with _PMAKE: with PORTS_PRIVSEP it will use
SUDO, and else simply call MAKE

Comments or OK ?
--
Sebastien Marie


diff f5e76299423013696ca147ca8aa4e8e28b2f4f8a /home/semarie/repos/openbsd/ports
blob - 33e8198b606277cf647447caafef7805bda2a077
file + devel/cargo/cargo.port.mk
--- devel/cargo/cargo.port.mk
+++ devel/cargo/cargo.port.mk
@@ -204,6 +204,10 @@ do-test:

# modcargo-metadata: regenerate metadata. useful target when working on a port.
modcargo-metadata: patch
+ @${_PMAKE} _modcargo-metadata
+
+# run as _pbuild
+_modcargo-metadata:
@${MODCARGO_post-patch}

# modcargo-gen-crates will output crates list from Cargo.lock file.

No comments:

Post a Comment