FS#63591 - [samba] upgrading removes symlink /var/lib/samba

Attached to Project: Arch Linux
Opened by Grotlek (grotlek) - Thursday, 29 August 2019, 11:50 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 29 August 2019, 12:02 GMT
Task Type Bug Report
Category Packages: Extra
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

Symlinking is a good way to have configuration files and associated data kept in a different storage area (on a backed-up RAID array in my case), or just safe in case of an OS reinstall being required. Putting all the important configuration files in one place makes sense from that perspective.

Most packages cope with their configuration files or directories being symlinks. However samba does not. If the /var/lib/samba directory is a symlink, the symlink gets deleted every time the package is updated and a stock configuration reinstated.

The package installer/upgrader should not arbitrarily delete stuff it doesn't recognise: it should either recognise a symlink and follow it, or not touch it and give a warning message. Thankfully it's only the symlink itself which is deleted, not the user database or configuration files.

Steps to recreate:
1. mv /var/lib/samba /var/lib/samba.real
2. ln -s /var/lib/samba.real /var/lib/samba
3. pacman -Syu (when samba needs to be upgraded).

Expected outcome: /var/lib/samba is still a symlink and any modifications required to files within that directory are done on the actual files within /var/lib/samba.real.
Actual outcome: /var/lib/samba is unlinked and replaced with a stock directory; no changes are made to /var/lib/samba.real and it is no longer used by samba (until someone goes in and fixes it). Effectively until someone goes in and re-links the directory, all your shares, users, passwords and other configuration data appear deleted.
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 29 August 2019, 12:02 GMT
Reason for closing:  Not a bug
Additional comments about closing:  This has nothing to do with the samba package, that's how pacman works

Loading...