Bug#757891: init-system-helpers: Please do not depend on perl

Brendan O'Dea bod at c47.org
Fri Aug 15 13:49:45 BST 2014


On 13 August 2014 17:11, Michael Stapelberg <stapelberg at debian.org> wrote:
> Brendan O'Dea <bod at c47.org> writes:
> I think an increase of 150 KiB is perfectly fine when it frees us from
> unnecessary reimplementation work, whose only potential outcome is to
> introduce new bugs :).

Sure, although this decision really lies with the Perl and Debian
Installer maintainers rather than you or I, since they are the ones
who need to deal with the potential impacts of increasing the size and
complexity (however minimally) of perl-base.

My recommendation would be to consider including File::Find, and
File::Temp.  I would be somewhat more wary about including File::Path,
which has had a particularly chequered history security wise[0], and
personally I would just use the system to call "/bin/mkdir -p" or
"/bin/rm -rf" (using the list syntax, avoiding shell).  Dropping
File::Path would also remove the need for File::Basename, which adds
10 KiB to provide[2]:

  sub basename { local $_ = shift; s#.*/##; return $_ }

>> It does occur to me however that if rsyslog (or any other packages
>> controlled by init for that matter) are going to be installed as part
>> of the initial base system by d-i, then is it is worth simplifying the
>> run-time dependencies of init-system-helpers by rewriting it in C?
> Absolutely not. I have written enough C code in my life that I really
> really don’t want to do this and I think it’d be actively harmful. The
> perl code we have is well tested and reasonably simple to understand.

This wasn't a request for *you* particularly to rewrite it, but rather
a general question about how important this package was to the
installer, and whether or not it would be appropriate to consider
changing the implementation language.

--bod

[0] Having provided much of the current rmtree implementation, I feel
justified in recommending not using it, and stand by my suggestion of
just using /bin/rm[1]

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905#34

[2] While File::Basename is more complex than my trivial subroutine,
deb-systemd-helper doesn't appear to require more than that.




More information about the Pkg-systemd-maintainers mailing list