Summary: | [bsd.port.mk] ports tree Makefiles fail to setup a standardardized ENV | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Ronald F. Guilmette <rfg> |
Component: | Ports Framework | Assignee: | Port Management Team <portmgr> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | jmmv, julio, rfg-freebsd, tcberner |
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Ronald F. Guilmette
2010-03-07 20:00:02 UTC
State Changed From-To: open->suspended This is a feature request; it needs someone to take an interest in coding up some patches for testing. Class Changed From-To: sw-bug->change-request Responsible Changed From-To: freebsd-ports-bugs->portmgr *** Bug 182909 has been marked as a duplicate of this bug. *** Err, which feedback was needed here? The problem is clear: building packages from ports is not reproducible because the build is highly subject to the user's environment configuration. The solution is of course not so simple, but why close this bug? (Reopening to ensure this gets seen.) So, this has been sitting for 6 years, nobody provided a patch, nobody even commented saying "hey, this is important", so nobody cares. If *you* care, please, provide a patch so that this can get fixed, if you don't, it will stay open until the end of times. Well, the duplicate bug filed over 2 years ago counts as "hey, this is important", doesn't it? (I know, I know, 2-3 years is _also_ a long time!) Regardless: I think that having ports builds depend on the environment is particularly bad. Builds should be reproducible, and the fact that the ports tree does not attempt to sanitize the environment goes against this. Builds can fail mysteriously depending on what the user had in his environment, so I think addressing this problem will reduce support requests and make things more predictable. Last time I looked, clearing the bunch of variables that have most chances of adversely affecting the build should be easy, but going the blacklist route is suboptimal because surely some will be missed. Turning this into a whitelist of variables to use, or making ports completely ignore the user's environment, is probably better but requires more work. FTR, pkgsrc implements a blacklist. Not perfect, but seems to have worked reasonably well so far. I personally can't do the changes and verify that they work properly for the whole ports tree... I sincerly regret that I have been unable to provide a patch since the time that I had originally submitted this PR. And in fact, contrary to my original optimism, I am unsure now even how some kind of proper fix for this issue would be implemented. I will say however that a simple googling of "clear all environment variables" yields many relevant results. I would like to believe that various steps to do this exact thing could be somehow integrated into the standardized port build process, i.e. so that the environment could be fully cleared at the outset of any port build, however due to other commitments, I personally am unable to work on this small project at this time. Moin moin Closing this, due to old age. Please re-open the issue. mfg Tobias |