#1119941 grub2: /usr/share/doc/grub-common leftover/messed-up

Package:
src:grub2
Source:
src:grub2
Submitter:
Christoph Anton Mitterer
Date:
2025-11-05 04:09:01 UTC
Severity:
normal
#1119941#5
Date:
2025-11-02 16:02:29 UTC
From:
To:
Hey.

Getting rid of grub-common seems to have left over some files:
Purging configuration files for grub-common (2.14~git20250718.0e36779-2) ...
dpkg: warning: while removing grub-common, directory '/usr/share/doc/grub-common' not empty so not removed

# tree /usr/share/doc/grub-common
/usr/share/doc/grub-common
├── examples
│   └── grub.cfg
├── AUTHORS
├── NEWS.Debian.gz
├── NEWS.gz
├── README
├── THANKS
├── TODO
├── changelog.Debian.gz
├── changelog.gz
└── copyright

None of them is registered anymore to any package:
# dpkg -S /usr/share/doc/grub-common
dpkg-query: no path found matching pattern /usr/share/doc/grub-common

though it seems they're still "used":
# ls -ald /usr/share/doc/grub*
lrwxrwxrwx 1 root root  11 May 18  2011 /usr/share/doc/grub2-common -> grub-common
drwxr-xr-x 1 root root 184 Nov  2 16:42 /usr/share/doc/grub-common
lrwxrwxrwx 1 root root  11 Jun 19  2021 /usr/share/doc/grub-efi -> grub-common
lrwxrwxrwx 1 root root  18 Sep 18  2023 /usr/share/doc/grub-efi-amd64 -> grub-efi-amd64-bin
drwxr-xr-x 1 root root 108 Nov  2 16:42 /usr/share/doc/grub-efi-amd64-bin
lrwxrwxrwx 1 root root  11 Jul 10  2024 /usr/share/doc/grub-efi-amd64-unsigned -> grub-common
lrwxrwxrwx 1 root root  11 May 18  2011 /usr/share/doc/grub-pc-bin -> grub-common

The current grub2-common package should have all these files in
/usr/share/doc/grub2-common, see:
# dpkg -L grub2-common | grep doc
/usr/share/doc
/usr/share/doc/grub2-common
/usr/share/doc/grub2-common/AUTHORS
/usr/share/doc/grub2-common/NEWS.Debian.gz
/usr/share/doc/grub2-common/NEWS.gz
/usr/share/doc/grub2-common/README
/usr/share/doc/grub2-common/THANKS
/usr/share/doc/grub2-common/TODO
/usr/share/doc/grub2-common/changelog.Debian.gz
/usr/share/doc/grub2-common/changelog.gz
/usr/share/doc/grub2-common/copyright
/usr/share/doc/grub2-common/examples
/usr/share/doc/grub2-common/examples/grub.cfg


Before the upgrade, i.e. still on version 2.12-9, this looked like:
# dpkg -S /usr/share/doc/grub-common/*
grub-common: /usr/share/doc/grub-common/AUTHORS
grub-common: /usr/share/doc/grub-common/changelog.Debian.gz
grub-common: /usr/share/doc/grub-common/changelog.gz
grub-common: /usr/share/doc/grub-common/copyright
grub-common: /usr/share/doc/grub-common/examples
grub-common: /usr/share/doc/grub-common/NEWS.Debian.gz
grub-common: /usr/share/doc/grub-common/NEWS.gz
grub-common: /usr/share/doc/grub-common/README
grub-common: /usr/share/doc/grub-common/THANKS
grub-common: /usr/share/doc/grub-common/TODO


So there seems a bit of a messup.


Cheers,
Chris.

#1119941#10
Date:
2025-11-04 01:07:20 UTC
From:
To:
Just for the records:

If one purges grub-common along with upgrading the other packages, one
gets the following:
/usr/share/doc# l grub* -d
drwxr-xr-x 1 root root 184 Nov  4 01:57 grub2-common
lrwxrwxrwx 1 root root  18 Oct  2  2023 grub-efi-amd64 -> grub-efi-amd64-bin
drwxr-xr-x 1 root root 108 Nov  4 01:57 grub-efi-amd64-bin
lrwxrwxrwx 1 root root  11 Jun 19  2021 grub-efi -> grub-common
lrwxrwxrwx 1 root root  11 Jul 10  2024 grub-efi-amd64-unsigned -> grub-common
lrwxrwxrwx 1 root root  11 May 19  2011 grub-pc-bin -> grub-common

with the last three symlinks dangling.


Cheers,
Chris.

#1119941#15
Date:
2025-11-05 04:07:01 UTC
From:
To:
For the records, a number of dangling symlinks were left over, too:

# find /etc/systemd/ -xdev -xtype l | grep grub
/etc/systemd/system/multi-user.target.wants/grub-common.service
/etc/systemd/system/hibernate.target.wants/grub-common.service
/etc/systemd/system/suspend.target.wants/grub-common.service
/etc/systemd/system/hybrid-sleep.target.wants/grub-common.service
/etc/systemd/system/suspend-then-hibernate.target.wants/grub-common.service

Guess the service wasn't disabled before it was removed?