Summary: | Mk/bsd.port.mk: PKGFILE wrong at “make -V PKGFILE” | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Kalten <kalten> |
Component: | Ports Framework | Assignee: | Bryan Drewery <bdrewery> |
Status: | Open --- | ||
Severity: | Affects Many People | CC: | bdrewery |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Kalten
2014-08-25 14:28:02 UTC
let's start with portmgr... It's complicated because it changes depending on whether it can write to your packages/ dir. Either way it will write the package to work/pkg/ and then if it can write to your PACKAGES dir it will copy it over to there. If you are depending on PKGFILE for something then it is best that your PACKAGES dir is writable by you as well. It may be that a bug exists where it is not creating the PACKAGES dir by default anymore. If so I can fix that. I don't have time to check at the moment though. (In reply to Bryan Drewery from comment #2) > It's complicated because it changes depending on whether it can write to > your packages/ dir. We are told to try to “Package as an unprivileged user [or else set] NEED_ROOT=yes”¹⁾—so, yes: I am not allowed to write to that directory. But that had not been my point (it would be the then branch). > Either way it will write the package to work/pkg/ and then if it can write > to your PACKAGES dir it will copy it over to there. exactly: so spitting out “./${PKGNAME}${PKG_SUFX}” happens to be nonsense in any case but instead “${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}” as you have mentioned yourself right here (as I had in comment #0), namely: >> I suppose the else branch should be changed to >> PKGFILE?= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} > If you are depending on PKGFILE for something then it is best that your > PACKAGES dir is writable by you as well. As noted above, we are more or less told there¹⁾ to not be able to write to that directory, as we are to “Package as an unprivileged user” and we depend on PKGFILE, as we are told there¹⁾ to call “bzgrep work/stage `make -V PKGFILE`” (yes, one could substituete the real path for “`make -V PKGFILE`” but I do not deem that to make sense—what we are told to do in official documents like that¹⁾ one should work, in my opinion) > It may be that a bug exists where it is not creating the PACKAGES dir by > default anymore. If so I can fix that. I don't have time to check at the > moment though. It is only about the else branch as stated in comment #0 I hope to have cleared up everything. ru, Kalten ¹⁾ https://wiki.freebsd.org/ports/StageDir (In reply to Kalten from comment #3) > (In reply to Bryan Drewery from comment #2) > > It's complicated because it changes depending on whether it can write to > > your packages/ dir. > We are told to try to “Package as an unprivileged user [or else set] > NEED_ROOT=yes”¹⁾—so, yes: I am not allowed to write to that directory. But > that had not been my point (it would be the then branch). > > > Either way it will write the package to work/pkg/ and then if it can write > > to your PACKAGES dir it will copy it over to there. > exactly: so spitting out “./${PKGNAME}${PKG_SUFX}” happens to be nonsense in > any case but instead “${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}” as you have > mentioned yourself right here (as I had in comment #0), namely: > > >> I suppose the else branch should be changed to > >> PKGFILE?= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} > > > If you are depending on PKGFILE for something then it is best that your > > PACKAGES dir is writable by you as well. > As noted above, we are more or less told there¹⁾ to not be able to write to > that directory, as we are to “Package as an unprivileged user” and we depend > on PKGFILE, as we are told there¹⁾ to call Packaging as non-root is not related to you having a writable PACKAGES dir. It is about it being able to *build*. Many ports do not build unless they are root. > “bzgrep work/stage `make -V PKGFILE`” > (yes, one could substituete the real path for “`make -V PKGFILE`” but I do > not deem that to make sense—what we are told to do in official documents > like that¹⁾ one should work, in my opinion) > > > It may be that a bug exists where it is not creating the PACKAGES dir by > > default anymore. If so I can fix that. I don't have time to check at the > > moment though. > It is only about the else branch as stated in comment #0 > > I hope to have cleared up everything. Aha, thanks for pointing out it was in this document. This check is not needed at all anymore. > > ru, > Kalten > > ¹⁾ https://wiki.freebsd.org/ports/StageDir I'll fix all of this. I created the problems. |