ITP: inetsim

Lukas Schwaighofer lukas at schwaighofer.name
Mon Feb 12 20:55:14 UTC 2018


Hi GengYu,

I was unavailable on the weekend again (and forgot to let you know), so
sorry for the delay.

On Fri, 9 Feb 2018 05:53:57 +0000
GengYu Rao <zouyoo at outlook.com> wrote:

> Because that is what we are doing with the logic of your postinst
> script
> New samples in updated versions ofthe inetsim package will *not* be
> automatically installed
> 
> 
> I added the
> if [ "$1" = upgrade ]; then
>     cp -a -u /usr/share/inetsim/data/* /var/lib/inetsim/ 2> /dev/null
> So it will be copied to the right place now.

Sorry, I seem to have missed that.  The postinst is never called with
"upgrade" as its parameter.  It will be called with "configure" both on
initial package installation as well.  Please read the documentation
and adjust accordingly.  (There is now also some duplication of your
logic, please remove that so the script becomes easier to maintain.)

> (the binary is already loaded into memory and won't notice that the
> underlying file changes).
> 
> 
> Sorry, i don't know much about the Perl language,
> some said Perl will only read the source file once, and
> won't read again. But some also said, the source file
> can be re-load if there are some certain code[1]
> I found there is "eval" in the code, but i know nothing about Perl
> Since we don't know if the next version will replace any code
> I think it is better to stop the Perl script.
> And also, the script maybe using  sample files as a simulation,
> so it is not good to replace the sample while running.
> 
> [1] https://stackoverflow.com/a/3619045

Ok.  Now that you replace the samples as well, it's probably safer to
stop or restart.  Since you have your reasons for not restarting that's
fine for me.

Lintian also reports two few minor problems you should fix:
* package-contains-empty-directory: A quick look suggests that you do
  not need any of those empty directories any more since you perform
  all the relevant work in the postinst script already.
* maintainer-script-should-not-use-recursive-chown-or-chmod: A bit
  tricker to fix.  If you're having trouble feel free to ask for help.

Regards
Lukas



More information about the Pkg-security-team mailing list