#1004090 tasksel: A comma in a task's Description breaks tasksel

#1004090#5
Date:
2022-01-20 17:43:25 UTC
From:
To:
Dear Maintainer,

in Kali Linux we made the mistake to put a comma in a task description:

  Description: everything -- almost all tools [>= 7 GB to download, >= 16 GB installed]

Cf https://gitlab.com/kalilinux/packages/tasksel/-/commit/c55a2e8b for
the complete file.

It turns out that this is not supported, because all the descriptions
are themselves packed together in a string and separated with a comma,
when tasksel.pl passes it over to tasksel-debconf. And this string is
fed to the file debian/templates which is a rfc-822 kind of file. So
there's a quite strong expectation that Descriptions should not contain
a comma, because values for the RFC-822 file are themselves comma
separated.

Interestingly, tasksel.pl escapes this comma (cf tasksel.pl, function
format_description_for_debconf), so it's aware of the problem. Maybe it
used to work, but right now it doesn't.

So what happens with a comma in the task description? Nothing on the
surface, one can still see the task in the tasksel UX, and select it.
But then tasksel silently drops it. The value of RET (from script
tasksel-debconf) is wrong, in the sense that the task with the offending
comma is missing.

For example in Kali, the value for RET is:

  "desktop, desktop-xfce, meta, meta-top10, meta-default, ,"

While it should be:

  "desktop, desktop-xfce, meta, meta-top10, meta-default, meta-everything,"

I hope it makes sense. I'm not sure I explain the problem very well.

In any case, documenting that task descriptions should not contain a
comma seems like an easy thing to do, for a start. Do you want such a patch?

Thanks,

  Arnaud

#1004090#10
Date:
2025-05-20 15:22:41 UTC
From:
To:
Hi Arnaud,

Arnaud Rebillout <arnaudr@kali.org> (2022-01-21):

As pointed out by Holger Wansing, the same issue popped up in blendsel
(#1106127). Documentation is nice but I think we should have something
stronger like an FTBFS if an offending description is spotted. If we
have both, the latter can point to the former. :) There's a PoC branch
in blendsel.

The other report includes pointers to a possible real fix, which would
require some escaping.


Cheers,