Page MenuHomeFreeBSD

ports.7: mention SU_CMD
ClosedPublic

Authored by pstef on Jun 24 2020, 8:33 PM.
Referenced Files
Unknown Object (File)
Thu, Dec 5, 2:53 PM
Unknown Object (File)
Oct 27 2024, 10:46 AM
Unknown Object (File)
Oct 3 2024, 12:06 PM
Unknown Object (File)
Oct 3 2024, 8:26 AM
Unknown Object (File)
Oct 2 2024, 8:15 PM
Unknown Object (File)
Oct 2 2024, 11:24 AM
Unknown Object (File)
Sep 30 2024, 12:48 AM
Unknown Object (File)
Sep 27 2024, 11:27 AM
Subscribers

Details

Summary

Start promoting use of unprivileged users for building ports by documenting SU_CMD.
Phrasing by Daniel O'Connor.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pstef requested review of this revision.Jun 24 2020, 8:33 PM
pstef created this revision.

I'm not completely sure about .It Va, but the Va macro is not documented in mandoc(7) and only appears in some openbsd mandoc.samples man-page which doesn't seem to be connected to their or our build, where it's referenced as a variable.
.Ql also isn't documented in mandoc(7), however it's a quoted literal according to groff_mdoc(7) from textproc/groff, so I think it's fine.

You also need to attach an actual reviewer, as I'm just a stand-in. ;)

share/man/man7/ports.7
395 ↗(On Diff #73599)

Should be .It Va

397 ↗(On Diff #73599)

Should also be .It Va

401 ↗(On Diff #73599)

Should also be .It Va

0mp added a subscriber: 0mp.

LGTM!


Just a note for your consideration: I wonder if we should mention there, that people often use set SU_CMD to use sudo (I do at least):

.if exists(/usr/local/bin/sudo)
SU_CMD= /usr/local/bin/sudo -E sh -c
.endif
This revision is now accepted and ready to land.Jun 26 2020, 9:04 PM
share/man/man7/ports.7
395 ↗(On Diff #73599)

Actually, It is not necessary here. It is for list items.

What I did is I think consistent with the rest of the file, for example

.It Cm fetch
Fetch all of the files needed to build this port from the sites
listed in
.Va MASTER_SITES
and
.Va PATCH_SITES .
See
.Va FETCH_CMD , MASTER_SITE_OVERRIDE
and
.Va MASTER_SITE_BACKUP .

Well, an actual doc persons opinion is more valuable than mine, so I defer :)

I'm not completely sure about .It Va, but the Va macro is not documented in mandoc(7) and only appears in some openbsd mandoc.samples man-page which doesn't seem to be connected to their or our build, where it's referenced as a variable.
.Ql also isn't documented in mandoc(7), however it's a quoted literal according to groff_mdoc(7) from textproc/groff, so I think it's fine.

You also need to attach an actual reviewer, as I'm just a stand-in. ;)

Va is defined in mdoc(7)! So is Ql :)

In D25433#562475, @0mp wrote:

Just a note for your consideration: I wonder if we should mention there, that people often use set SU_CMD to use sudo (I do at least):

.if exists(/usr/local/bin/sudo)
SU_CMD= /usr/local/bin/sudo -E sh -c
.endif

As we all know, sudo is a port itself and not necessary to utilize SU_CMD (as portmaster.8 seems to claim, the way I read it). I'd omit sudo from ports.7 entirely on the basis that it doesn't have any advantage over su(1), but that would be incorrect - it's at least more convenient to not have to type in the password all the time. I could mention it here, but I think there are not too many people who use su(1) on a daily basis and not know about sudo. If they know, they will easily decide whether to use su or sudo.

In D25433#562475, @0mp wrote:

Just a note for your consideration: I wonder if we should mention there, that people often use set SU_CMD to use sudo (I do at least):

.if exists(/usr/local/bin/sudo)
SU_CMD= /usr/local/bin/sudo -E sh -c
.endif

As we all know, sudo is a port itself and not necessary to utilize SU_CMD (as portmaster.8 seems to claim, the way I read it). I'd omit sudo from ports.7 entirely on the basis that it doesn't have any advantage over su(1), but that would be incorrect - it's at least more convenient to not have to type in the password all the time. I could mention it here, but I think there are not too many people who use su(1) on a daily basis and not know about sudo. If they know, they will easily decide whether to use su or sudo.

Good observation. Let's not mention sudo here then.

pstef edited the summary of this revision. (Show Details)

Phrasing by Daniel O'Connor.

This revision now requires review to proceed.Jul 16 2020, 8:50 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 17 2020, 6:33 AM
This revision was automatically updated to reflect the committed changes.