Re: git: e4b7e0154f5e - main - Mk/bsd.options.desc.mk: Expand ASLR

From: Mathieu Arnold <mat_at_freebsd.org>
Date: Sat, 23 Dec 2023 08:41:49 UTC
On Sat, Dec 23, 2023 at 11:15:01AM +0300, Mikhail Pchelin wrote:
> On Sat, Dec 23, 2023 at 08:54:41AM +0100, Mathieu Arnold wrote:
> > On Fri, Dec 22, 2023 at 11:44:57PM +0000, Muhammad Moinur Rahman wrote:
> > > diff --git a/Mk/bsd.options.desc.mk b/Mk/bsd.options.desc.mk
> > > index d20740cc888a..f877b04dd8d4 100644
> > > --- a/Mk/bsd.options.desc.mk
> > > +++ b/Mk/bsd.options.desc.mk
> > > @@ -30,7 +30,7 @@ APE_DESC?=		Monkey's Audio lossless format support
> > >  ARCHIVE_DESC?=		bzip2/zip/iso9660 archive support
> > >  ARMADILLO_DESC?=	TPS transform computation via Armadillo
> > >  ASIO_DESC?=		Asynchronous I/O support
> > > -ASLR_DESC?=		Enable ASLR support
> > > +ASLR_DESC?=		Enable Address Space Layout Randomization support
> > >  ASM_DESC?=		Use optimized assembly code
> > >  ASPELL_DESC?=	Spell checking support via GNU Aspell
> > >  ASSERT_DESC?=	Enable debug assertions
> > 
> > To be a bit pedantic, it still means little to the user, does it mean it
> > will build stuff with the random bits, or that it adds random bits to
> > stuff when running...
> 
> If a user don't understand implications of enabling the option one
> should not check or uncheck it and rely on the defaults, provided by the
> maintainer.

If the user is unable to understand what an option does, it is not the
user's fault, it is the maintainer's.
The maintainer has to provide meaningfull descriptions for the options
so that the user can understand by reading the description if they want
or not the option.

If I build, say, libreoffice, and an option says :

  [ ] ASPELL - Spell checking support via GNU Aspell
  [ ] JAVA   - Java support (XML filters, macros, DB connections)
  [ ] MMEDIA - Enable multimedia backend for Impress

Ok, great, I understand what it does, the last one is a bit vague, but I
don't plan on using impress, so I don't need it.

If I build the same port and options saying :

  [ ] ASPELL - Enable Aspell support
  [ ] JAVA   - Enable Java support
  [ ] MMEDIA - Enable multimedia support

I have absolutely no idea if I need those or not.

I know what aspell is, and if I don't, it has "spell" in it, so I assume
it is about spell checking, ok, I can get that one.

I know what Java is, but I have no idea what it implies for the context
of this port, maybe it is java syntax highlighting, maybe it allows
running java stuff. So, I am not a java developer, I say no.

I know what multimedia means, so, I assume it is about adding pictures
in documents, I'll need that, so I say yes.

Now, I have made two wrong assumptions, I actually need java because I
need macros and db connections, and I don't need multimedia because it's
about Impress that I don't use.


A user MUST NOT have to assume what the options will do, a user has to
have a precise idea what it implies.


Sometime, the description is too short to explain what it actually does,
in those cases, the maintainer can add a pkg-help file, and when running
make config (try in dns/bind918) the dialog will start with a line saying :

  'Help' button for port info, 'F1' for Ports Collection help.

And there is a help button beside the usual ok and cancel ones, hitting
F1 or the help button will display the pkg-help file, that can go in
much deeper explanation about what an option does.

> If a user wants to know more - ASLR acronym is perfectly googlable with
> wikipedia article being the first link.

The user will learn what ASLR is, yes.

My point is that the user will still not be able to know what enabling
ASLR will do in that port.

  - Will it build the port with ASLR?
  - Will it allow the port to build stuff with ASLR?
  - Will it allow the port to run with ASLR?
  - Will it use ASLR while building the port?
  - ...

-- 
Mathieu Arnold