[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#992798: initramfs-tools: please drop shellcheck autopkgtest



Source: initramfs-tools
Version: 0.140
Severity: serious
X-Debbugs-CC: debian-ci@lists.debian.org, shellcheck@packages.debian.org
Tags: sid bookworm
User: debian-ci@lists.debian.org
Usertags: needs-update
Control: affects -1 src:shellcheck

Dear maintainer(s),

With a recent upload of shellcheck the autopkgtest of initramfs-tools
fails in testing when that autopkgtest is run with the binary packages
of shellcheck from unstable. It passes when run with only packages from
testing. In tabular form:

                       pass            fail
shellcheck             from testing    0.7.2-2
initramfs-tools        from testing    0.140
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of shellcheck to
testing [1]. Of course, shellcheck shouldn't just break your autopkgtest
(or even worse, your package), but in this case shellcheck just evolved.
Static analysis tools are intended to run on source code, while
autopkgtest is intended to run against installed packages, where source
code is in principle not relevant; we want to know whether the binary
packages, as provided in the Debian archive, work correctly. In our
opinion running this type of tools as integration tests in autopkgtest,
or even as build-time tests is Wrong™, and should not be done. (Having
them run in salsaci or equivalent is of course totally great.)

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=shellcheck

https://ci.debian.net/data/autopkgtest/testing/amd64/i/initramfs-tools/14767451/log.gz

autopkgtest [02:16:57]: test shellcheck: [-----------------------

In /usr/bin/unmkinitramfs line 115:
			if [ -n "$dir" ]; then
                                 ^--^ SC2030: Modification of dir is
local (to subshell caused by (..) group).


In /usr/bin/unmkinitramfs line 130:
		xcpio "$subarchive" "${dir:+$dir/main}" -i "$@"
                                     ^---------------^ SC2031: dir was
modified in a subshell. That change might be lost.
                                            ^--^ SC2031: dir was
modified in a subshell. That change might be lost.


In /usr/bin/unmkinitramfs line 133:
		xcpio "$initramfs" "$dir" -i "$@"
                                    ^--^ SC2031: dir was modified in a
subshell. That change might be lost.


In /usr/share/initramfs-tools/init line 170:
		[ "x$debug" = "xy" ] && log_output=/dev/kmsg
                  ^-------^ SC2268: Avoid x-prefix in comparisons as it
no longer serves a purpose.

Did you mean:
		[ "$debug" = "y" ] && log_output=/dev/kmsg


In /usr/sbin/update-initramfs line 14:
if [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] && [ $# = 1 ] && [ x"$1" = x-u ]; then
                                                         ^---^ SC2268:
Avoid x-prefix in comparisons as it no longer serves a purpose.

Did you mean:
if [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] && [ $# = 1 ] && [ "$1" = -u ]; then


In /usr/share/initramfs-tools/scripts/nfs line 42:
	if [ "x${NFSROOT}" = "xauto" ]; then
             ^-----------^ SC2268: Avoid x-prefix in comparisons as it
no longer serves a purpose.

Did you mean:
	if [ "${NFSROOT}" = "auto" ]; then

For more information:
  https://www.shellcheck.net/wiki/SC2030 -- Modification of dir is local
(to ...
  https://www.shellcheck.net/wiki/SC2031 -- dir was modified in a
subshell. T...
  https://www.shellcheck.net/wiki/SC2268 -- Avoid x-prefix in
comparisons as ...
autopkgtest [02:17:03]: test shellcheck: -----------------------]

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: