devel/cargo module: modcargo-metadata adjustement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

devel/cargo module: modcargo-metadata adjustement

Sebastien Marie-3
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.

Reply | Threaded
Open this post in threaded view
|

Re: devel/cargo module: modcargo-metadata adjustement

Jeremie Courreges-Anglas-2
On Sun, Sep 08 2019, Sebastien Marie <[hidden email]> wrote:

> 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 ?

ok jca@

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE