ITP: inetsim
Lukas Schwaighofer
lukas at schwaighofer.name
Mon Jan 29 20:17:10 UTC 2018
Hi GengYu,
On Mon, 29 Jan 2018 07:38:49 +0000
GengYu Rao <zouyoo at outlook.com> wrote:
> i putted it here https://salsa.debian.org/zouyoo-guest/inetsim
Cool! I've now completed the review I started yesterday, here are the
remaining comments:
* Standards-Version is slightly outdated (should be 4.1.3 now)
* Most of the empty directories are not needed in the package since
they are created by the postinst file anyways:
cp -a -u /usr/share/inetsim/data/* /var/lib/inetsim/
So all the subdirs of /var/lib/inetsim are unnecessary
- You should probably just `mkdir -p` the two needed directories
in /var/log/inetsim and /var/lib/inetsim in postinst
- I don't think you should `rm -rf` /etc/inetsim
and /usr/share/perl5/INetSim in postrm/purge. Those directories
are cleaned up as necessary by dpkg already
* Maintainer scripts: All of them have an `exit 0` before the
#DEBHELPER# placeholder (which is where debhelper will insert some
shell code). That's harmful, as the debhelper generated code will
never be executed! Either remove the `exit 0` or move it after the
#DEBHELPER#.
* What's the reasoning behind the copying samples to /var/lib logic in
postinst?
- The way it's implemented now these examples will become outdated
when a user upgrades to a newer version shipping updated examples.
Is that intentional?
- If there is a valid reason, please explain that in a short comment
in the postinst file.
- There is quite a bit of redundancy in the copying logic: The
first `cp` is a superset of many of the other `cp` commands that
follow
* Why do you source /etc/default/inetsim at the end of the postinst
file. That seems to be a very bad idea:
- If this file was edited by the user and contains a syntax error,
the dpkg process will exit uncleanly when the package is upgraded!
- You don't seem to use any of the variables afterwards, so this can
simply be removed.
* If you have some information that the user should see, you need to
implement that using debconf. Using `echo` is not really
appropriate, the message will just scroll by and hardly anyone will
notice it.
* You can remove your prerm script completely, as the debhelper
generated code will take care of stopping inetsim already.
* Lintian warns about /usr/share/inetsim/contrib/init.d.inetsim being a
non-executable script. You should probably remove that file from
your package, since a (slightly different) init script is installed
to /etc/init.d anyways.
That's what I have for now. Since there are still quite a few problems
with the maintainer scripts I haven't tested installing/running inetsim
yet. Ping me when you've addressed the issues I found and I will
re-check.
Regards
Lukas
More information about the Pkg-security-team
mailing list