FS#63069 - {arch-install-scripts} genfstab not removing swapfile chroot prefix

Attached to Project: Arch Linux
Opened by Uros Juvan (asmpro) - Tuesday, 02 July 2019, 08:44 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 13 November 2019, 22:04 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


Additional info:
* package version(s)
Present at least in installer ISO archlinux-2019.06.01-x86_64.iso

* config and/or log files etc.


* link to upstream bug report, if any

Steps to reproduce:

genfstab -U /mnt
# /dev/sda1
UUID=b2717ed4-1fff-4312-b520-bf87111b1a5a / ext4 rw,relatime 0 1

/mnt/swapfile none swap defaults 0 0

Corrected version:
./genfstab -U /mnt
# /dev/sda1
UUID=b2717ed4-1fff-4312-b520-bf87111b1a5a / ext4 rw,relatime 0 1

/swapfile none swap defaults 0 0

Patch:
--- /usr/bin/genfstab 2019-01-05 16:26:33.000000000 +0000
+++ genfstab 2019-07-02 08:31:55.751942239 +0000
@@ -477,7 +477,7 @@
[[ $device = *'\040(deleted)' ]] && continue

if [[ $type = file ]]; then
- printf '%-20s' "$device"
+ printf '%-20s' "${device#$root}"
elif [[ $device = /dev/dm-+([0-9]) ]]; then
# device mapper doesn't allow characters we need to worry
# about being mangled, and it does the escaping of dashes
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Wednesday, 13 November 2019, 22:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  The fix is now tagged as v23 and will be packaged soon.
Comment by Eli Schwartz (eschwartz) - Tuesday, 02 July 2019, 17:53 GMT
Should be fixed via https://git.archlinux.org/arch-install-scripts.git/commit/?id=4eb54af72a30443738683a13906c7aa2f4494112

This required a bit more than your proposal, to correctly handle the case of:

genfstab -U /
Comment by Uros Juvan (asmpro) - Tuesday, 02 July 2019, 18:29 GMT
You are correct.
I did not take into account this case since I am new to Arch and did not know genfstab is used after the initial installation as well :)

Loading...