You are not logged in.

#1 2022-09-12 12:37:20

Piroro-hs
Member
Registered: 2022-09-12
Posts: 2

[SOLVED] How to pass arbitrary variables to makepkg build environment

The man page of makepkg.conf states that "only the variables described below are exported to the build environment". Are there any way to configure arbitrary environment variables used in build environment instead of append KEY=VALUES pair each time I execute makepkg?

Last edited by Piroro-hs (2022-09-13 09:13:00)

Offline

#2 2022-09-12 13:03:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,167

Re: [SOLVED] How to pass arbitrary variables to makepkg build environment

makepkg has access to the environment of the user it's run under.

Unless you're building as a separate user (like in a clean chroot or with devtools) there's no need to pass variables .

Note that this is not supposed to be used for non-standard vars, think very carefully why that is needed.

I do it on my system/packages I maintain for 2 cases : preventing ninja from making my system nearly unusable and allowing user choice in aur mesa-git.
No idea if there others that use env vars this way.


Welcome to archlinux forum

Last edited by Lone_Wolf (2022-09-12 13:03:52)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2022-09-13 09:12:32

Piroro-hs
Member
Registered: 2022-09-12
Posts: 2

Re: [SOLVED] How to pass arbitrary variables to makepkg build environment

I want to set some Cargo specific variables only when building packages and not usual `cargo build` in my development flow.
I'll create wrapper around makepkg to achieve this.

Thanks.

Offline

Board footer

Powered by FluxBB