Page MenuHomeFreeBSD

ports.7: mention SU_CMD
ClosedPublic

Authored by pstef on Jun 24 2020, 8:33 PM.
Referenced Files
Unknown Object (File)
Sat, Mar 30, 4:33 PM
Unknown Object (File)
Dec 17 2023, 7:47 AM
Unknown Object (File)
Dec 7 2023, 6:33 PM
Unknown Object (File)
Dec 5 2023, 3:45 AM
Unknown Object (File)
Nov 7 2023, 7:17 PM
Unknown Object (File)
Nov 7 2023, 9:18 AM
Unknown Object (File)
Nov 2 2023, 12:33 AM
Unknown Object (File)
Oct 7 2023, 9:48 PM
Subscribers

Details

Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

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

Should be .It Va

397

Should also be .It Va

401

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

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.