Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72710 - [filesystem] package update should not fail if /etc/hosts is ro-mounted

Attached to Project: Arch Linux
Opened by Vladimir (_v_l) - Thursday, 11 November 2021, 11:26 GMT
Last edited by Jonas Witschel (diabonas) - Thursday, 11 November 2021, 13:01 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: on my systems `/etc/hosts` is mounted in ro mode (bind through /etc/fstab) and pacman failed to update `filesystem` package for this reason (ro).


Additional info:
* pacman 6.0.1-2, filesystem 2021.11.11

Steps to reproduce:
1. make /etc/hosts copy, say in /tmp
2. move /etc/hosts to /etc/hosts.old
3. mount (bind) /tmp/hosts to /etc/hosts, for example using /etc/fstab:
/tmp/hosts /etc/hosts none bind,ro,sync 0 0
4. try to update `filesystem` package

Workaround: unmount /etc/hosts, update the package and mount the /etc/hosts again but this is not optimal.

P.S. I know this setup may seem strange, but I use it to keep in sync `hosts` file across several systems.
This task depends upon

Closed by  Jonas Witschel (diabonas)
Thursday, 11 November 2021, 13:01 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Use NoUpgrade or pacman hooks to work around your custom setup
Comment by Jonas Witschel (diabonas) - Thursday, 11 November 2021, 13:00 GMT
This is not an issue with the filesystem package, but with the way pacman extracts packages in general. However, I am not sure what the package manager could be doing differently here: how is it supposed to know that you have a custom setup for single files on your system, or how to handle these? Note that similar setups like replacing directories with symlinks is not supported by pacman either, cf. e.g.  FS#62366 .

If you have such a setup, you need make sure yourself that your system is in a state where pacman can handle the upgrade. The easiest way would probably be adding etc/hosts to "NoUpgrade" in /etc/pacman.conf to avoid any attempts of upgrading it. As an alternative, consider using pacman pre- and post-transaction hooks in order to unmount and remount /etc/hosts.

Loading...