Discussion:
Bug#912041: grub-cloud-amd64: don't work around being tested by piuparts
Holger Levsen
2018-10-27 15:18:29 UTC
Permalink
Package: grub-cloud-amd64
Version: 0.0.2
Severity: important

Dear Maintainer,

in your postinst you are trying to detect whether it's being run in a
piuparts test, to workaround #912038 ("grub-cloud-amd64: fails to
install"), which is detected by piuparts but can also be triggered by
anyone installing it manually, with this code:

if [ ${PIUPARTS_TEST:-} ]; then
echo "Running Piuparts detected, exiting." >&2
exit 0
fi

This is bad, don't do that. piuparts tests stuff for a reason and as
#912038 shows, your package is still buggy.

In discussion on #-release before uploading grub-cloud 0.0.2 you claimed
that grub-cloud is only useful to install in cloud environments (which
are chroots) and thus detecting a chroot would not work. Still all packages
(aimed for a stable Debian release) must be installable in chroots, also
yours.

So instead of detecting whether the package is being tested by piuparts
you should detect whether grub-cloud-amd64 is being installed in a
cloud-chroot and only then do whatever it takes to active grub. For that
you can create some file while preparing the cloud chroot (say
/etc/.cloud_env) and only if that file is present you do those things
you now dont do if the variable $PIUPARTS_TEST is defined.

I've also filed a bug against lintian to detect maintainer scripts using this
variable as no maintainer script needs to do this. This is similar to
the lintian test detecting autokpkgtests just running "exit 0" or
"true". The bug against lintian is #912040.
--
cheers,
Holger

-------------------------------------------------------------------------------
holger@(debian|reproducible-builds|layer-acht).org
PGP fingerprint: B8BF 5413 7B09 D35C F026 FE9D 091A B856 069A AA1C
Debian Bug Tracking System
2018-12-08 18:21:21 UTC
Permalink
Your message dated Sat, 08 Dec 2018 18:20:38 +0000
with message-id <E1gVhDS-0006fP-***@fasolo.debian.org>
and subject line Bug#912041: fixed in grub-cloud 0.0.4
has caused the Debian Bug report #912041,
regarding grub-cloud-amd64: don't work around being tested by piuparts
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
912041: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912041
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...