[aur-general] PKGBUILD with side-effects outside of build-dir

Knut Ahlers knut at ahlers.me
Sat Sep 5 23:30:21 UTC 2020


Hey there,

Today I received a comment [1] on one of the packages I'm maintaining
asking for a change which I'm really not sure about:

Basically the requested change is to have the build use an external
environment variable (if set) which allows the packager to use an
directory outside of the current build directory (the directory
`makepkg` was executed in) for build assets.

This would on the one hand allow packagers to reuse crates already
built and not to build every dependency again within the build process
of the package itself. On the other hand this would introduce
side-effects to the package building process and also the system of
the packager. For builds within isolated environments like Docker
containers this would basically not change anything.

My personal opinion is strongly biased against allowing side effects
outside of the build-dir itself and against letting
(developer-)environment-settings, of the systems which execute the
build, interfere with the package build. In my opinion the build
should stay in a way neither is allowed or at least prevented as far
as possible.

As I did not find advice / consent on this in the Wiki or AUR-General
I'd like to have some opinions of other package maintainers on this:
How would you like to have package builds behave?

Act as isolated as possible, not reacting to outside influences (like
env-vars) though this will never be fully achieved without some
wrapper wiping all env-vars from the outside…

OR

Allow interference of outside influences and allow modifications
outside the build directory (for example store the build artefacts
outside the build-dir and package them from there)…

Cheers,
  Knut

[1] https://aur.archlinux.org/packages/dust/#comment-764039

-- 
Knut Ahlers
Software & Infrastructure Developer

Web & Blog: https://ahlers.me/
GPG-Key: 0xD34BE99E


More information about the aur-general mailing list