Hi!

On Wed, 2021-09-29 at 21:57:29 +0200, MichaIng wrote:
> Package: dpkg
> Version: 1.20.9

> I recognised just recently that dpkg is not able to gracefully replace files
> on FAT partitions, e.g. when reinstalling or upgrading a package. It seems
> to try creating a file link as backup, while FAT does not supports links:
> -------
> unable to make backup link of './path/to/file' before installing new
> version: Operation not permitted
> -------
> 
> This seems to be an expected behaviour, at least I found multiple cases
> where e.g. SBC OS images are shipped with a dedicated /boot FAT partition,
> and measures have been taken to remove existing files from /boot before
> kernel upgrades or via dpkg-divert loops.
> 
> Of course Debian is a Linux distribution and the root filesystem needs to
> support UNIX permissions, symlinks and hard links (?) for the system to
> function properly, but it is not uncommon to mount FAT partitions into the
> system, especially using a FAT partition for /boot is required for some ARM
> SBCs to boot and beneficial otherwise to allow fixing boot configuration
> issues or pre-configuring the system as well from Windows or macOS systems.
> 
> So my question is whether it wouldn't be feasible to handle the replacement
> of package files on FAT partitions (and other filesystem types with no link
> support) gracefully. A backup could be created differently if this is seen
> mandatory.

This is covered here:

  
<https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_What_are_the_filesystem_requirements_by_dpkg.3F>

The main problem is that dpkg does not really know what it is
managing, and cannot discern whether this is something for a boot
partition or similar. In addition falling back to say copies instead
of hardlinks has the potential of filling up those partitions usually
space-constrained anyway, and in general of changing inode information
if that ends up happening on non-boot partitions for whatever reason.

But then, as mentioned on the FAQ, it seems like these systems need to
rearrange the installation so that the FAT partition is not managed by
dpkg, and instead whatever is needed there gets copied by say the kernel
or boot-loader hooks that are in charge of updating it.

Given the above I'm inclined to just close this, as has been done in
the past for similar requests.

Thanks,
Guillem

Reply via email to