Non-standard flags (GOAMD64) are actually not used #149

Closed
opened 2022-09-12 17:19:25 +02:00 by Piroro-hs · 6 comments

As stated in the man page of makepkg.conf, variables not in the makepkg's supported vars list is not exposed to build environment.

https://man.archlinux.org/man/makepkg.conf.5.en#DESCRIPTION

As stated in the man page of makepkg.conf, variables not in the makepkg's supported vars list is not exposed to build environment. https://man.archlinux.org/man/makepkg.conf.5.en#DESCRIPTION
Owner

Oh, I thought I remembered something about this, but I assumed the PR-creator was aware about that limitation and did their research. Seems like that was not the case, so we need to pass this differently then.

I'll have a look later, I'm currently somewhat busy with work.

Oh, I thought I remembered something about this, but I assumed the PR-creator was aware about that limitation and did their research. Seems like that was not the case, so we need to pass this differently then. I'll have a look later, I'm currently somewhat busy with work.
anonfunc added the
bug
label 2022-09-12 19:12:01 +02:00

@anonfunc According to https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.0.2/scripts/libmakepkg/buildenv.sh.in#L41, only the flags there are exposed to the build environment. So every additional environment variables MUST be manually exported.

@anonfunc According to https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.0.2/scripts/libmakepkg/buildenv.sh.in#L41, only the flags there are exposed to the build environment. So every additional environment variables MUST be manually exported.
Owner

We need to rewrite how ALHP exports these vars. Having them in the makepkg would be convenient, but requires patches to devtools. I'd like to avoid that, so we have no other option then to export them directly. I'll have to test if exporting them before executing makechrootpkg even works, since sudo or systemd-nspawn probably filters those env vars as well.

We need to rewrite how ALHP exports these vars. Having them in the makepkg would be convenient, but requires patches to devtools. I'd like to avoid that, so we have no other option then to export them directly. I'll have to test if exporting them before executing `makechrootpkg` even works, since sudo or systemd-nspawn probably filters those env vars as well.

@anonfunc I think exporting them before executing makechrootpkg will not work. The common way that works is placing export FOO=bar in makepkg.conf.

@anonfunc I think exporting them before executing makechrootpkg will not work. The common way that works is placing `export FOO=bar` in `makepkg.conf`.
Owner

That could work. Will have a test later.

That could work. Will have a test later.
Owner

@AvianaCruz If I understand correctly, we just need to add export in front of our non-makepkg recognized flags and it should work fine. I can implement that later today.

@AvianaCruz If I understand correctly, we just need to add `export` in front of our non-makepkg recognized flags and it should work fine. I can implement that later today.
Sign in to join this conversation.
No description provided.