Thanks, and also confirmed on version 0.0.3+nmu3,
I ran across same within the past 24 hours.
Haven't fully tested, but looks like issue is likely also present in
versions 0.0.3+nmu4 and 0.0.3+nmu5
and may also be present in versions prior to 0.0.3+nmu3 (I haven't
specifically looked there).
I'm not exactly a python developer (yet?), but my quick peek,
looks like the issue comes from
./usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py
in the crossgrader package.
It appears slightly changed from
0.0.3+nmu3 to 0.0.3+nmu4
but I'm guestimating those changes make no difference to this bug,
and those files precisely match between
0.0.3+nmu4 and 0.0.3+nmu5
# diff -U 0
0.0.3+nmu{3,4}/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py
--- 0.0.3+nmu3/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py
2020-09-06 16:13:29.000000000 +0000
+++ 0.0.3+nmu4/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py
2024-09-22 16:47:41.000000000 +0000
@@ -22 +21,0 @@
-import appdirs
@@ -23,0 +23 @@
+import platformdirs
@@ -97 +97 @@
- storage_dir = appdirs.site_data_dir(APP_NAME)
+ storage_dir = platformdirs.site_data_dir(APP_NAME)
# cmp
0.0.3+nmu{4,5}/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py
&& echo IDENTICAL
IDENTICAL
#
And good and I think quite fitting that severity is important, as
the bug causes crossgrader to break other package(s),
notably it alters
/usr/share/initramfs-tools/hook-functions
belonging to
initramfs-tools-core
and furthermore:
through use of crossgrader's customary steps, including cleanup
and removal/purge, it never sets
/usr/share/initramfs-tools/hook-functions
back as it was before, even after remove/purge of crossgrader,
thus leaving
/usr/share/initramfs-tools/hook-functions
effectively broken by crossgrader once crossgrader is removed,
as crossgrader's changes to
/usr/share/initramfs-tools/hook-functions
render it dependent upon crossgrader.
I think that well warrants severity of important.
However, as a practical matter, I think for the most part those
that are doing crossgrading operations with crossgrader,
generally will (or ought) have the skills to identify and remedy such
issues, so probably not a huge deal.
And with this bug, and notes on it,
and what I've added on
https://wiki.debian.org/CrossGrading
finding information on the issue and dealing with it (effective
work-arounds) should also now be all that much easier.
And, did analyze a bit further, mere installation of crossgrader doesn't alter
/usr/share/initramfs-tools/hook-functions
however even the mere first stage dry run, e.g.:
# crossgrader --dry-run amd64
caused crossgrader to (quite unexpectedly at that!) alter
/usr/share/initramfs-tools/hook-functions
I'd presume the way crossgrader ought handle that, would be to place
it's own config file under /etc in appropriate location for
initramfs customizations, and after removal of crossgrader I'm presuming
that should still remain, but it should then be or be rendered harmless,
such that it doesn't or no longer depends upon crossgrader being
installed, and harmlessly does nothing if crossgrader isn't installed,
and that a purge of crossgrader would remove such file.
Work-arounds:
restore the earlier
/usr/share/initramfs-tools/hook-functions
That can also be accomplished by (re)installing the
initramfs-tools-core
package, e.g.:
# apt-get --reinstall install initramfs-tools-core
Additionally, in the interim, various Debian packages may have
gotten into various semi-broken states, most notably failed
during configuration, on account of the bug.
That can then generally be remedied, after fixing the above, by, e.g.:
# dpkg --configure -a
Wiki: in not necessarily any particular order, I've added some
quite relevant bits that should be helpful for those that do
or may encounter this bug, most notably on:
https://wiki.debian.org/CrossGrading
added:
https://wiki.debian.org/CrossGrading#bug-1114664-crossgrader-initramfs-tools-core
which well covers bug and work-around in section (using crossgrader):
Third (optional) stage and additional recommended/suggested cleanup
https://wiki.debian.org/CrossGrading#Third_.28optional.29_stage_and_additional_recommended.2Fsuggested_cleanup
And also added bit more of relevance in section
Recommended: specific files/state backup
https://wiki.debian.org/CrossGrading#Third_.28optional.29_stage_and_additional_recommended.2Fsuggested_cleanup
(notably suggesting first saving a copy of the file if one will or may
be using crossgrader)
Versions:
I ran into this on Debian 12.13 with crossgrader version 0.0.3+nmu3
Ran into the bug crossgrading from amd64 to i386 (egad, I ran into
another use case for that), and likewise also confirmed same bug
crossgrading from i386 to amd64. Also, examining the contents of
versions 0.0.3+nmu4 and 0.0.3+nmu5 seems to me probable that same bug
is also still present in those versions (though I didn't explicitly
test/run those).
Some specific diagnostic excerpts when bug is triggered - may help
folks also find this, e.g. via search engines, e.g.:
# apt-get -y install linux-image-6.1.0-42-686-pae
...
ModuleNotFoundError: No module named 'debian_crossgrader'
crossgrader initramfs hook: (WARNING) initramfs binary /sbin/modprobe
might not be in the correct architecture.
crossgrader initramfs hook: Ensure that it can be executed or
crossgrade the package containing it, then update the initramfs again.
crossgrader initramfs hook: output of `file /sbin/modprobe`:
...
most of the rest of the diagnostics are either pretty ordinary or
mostly redundant. The most telling bits are the references to
crossgrade, crossgrader, and debian_crossgrader after the crossgrade
package has been purged.
And much thanks for all Debian's fabulous work on all this!
And yes, severity: Important, but given context, (increasing)
information available,
work-arounds, etc., probably not a huge deal, but of course other
thoughts, opinions, evaluations may very well reasonably differ on
that.