[Bug 1228847] New: dracut: syntax error in convertfs module
https://bugzilla.suse.com/show_bug.cgi?id=1228847 Bug ID: 1228847 Summary: dracut: syntax error in convertfs module Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: dracut-maintainers@suse.de Reporter: antonio.feijoo@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Code from `/usr/bin/convertfs`:
#mount /sysroot/var if it is a separate mount VARDEV=$(sed -n -e 's/^\#.*//' -e '/ \/var /s/\([[:graph:]]* \).*/\1/p' /sysroot/etc/fstab) VARFS=$(sed -n -e 's/^\#.*//' -e '/ \/var /s/[[:graph:]]* * [[:graph:]]* *\([[:graph:]]* \).*/\1/p' /sysroot/etc/fstab)
if [ -n $VARDEV ] && [ -n $VARFS ]; then #mount btrfs subvolume var if [ $VARFS == btrfs ]; then SUBVOLIDVAR=$(btrfs subvolume list $ROOT | sed -n '/var$/s/ID \([[:digit:]]*\) .*/\1/p') ... [ -n $SUBVOLIDVAR ] && umount $ROOT/var
With POSIX conditionals using single brackets, `-n` followed by a variable without quotes is always true. So, if /etc/fstab does not define a separate /var, `[ -n $VARDEV ] && [ -n $VARFS ]` evaluates to true:
linux-rrky:/home/dev # VARDEV=$(sed -n -e 's/^\#.*//' -e '/ \/var /s/\([[:graph:]]* \).*/\1/p' "$ROOT"/etc/fstab) linux-rrky:/home/dev # VARFS=$(sed -n -e 's/^\#.*//' -e '/ \/var /s/[[:graph:]]* * [[:graph:]]* *\([[:graph:]]* \).*/\1/p' "$ROOT"/etc/fstab) linux-rrky:/home/dev # if [ -n $VARDEV ] && [ -n $VARFS ]; then echo "VARDEV=$VARDEV VARFS=$VARFS"; fi VARDEV= VARFS= linux-rrky:/home/dev # if [[ -n $VARDEV ]] && [[ -n $VARFS ]]; then echo "VARDEV=$VARDEV VARFS=$VARFS"; fi linux-rrky:/home/dev # if [ $VARFS == btrfs ]; then echo "YES"; else echo "NO"; fi; bash: [: ==: unary operator expected NO
Backport fix: https://github.com/openSUSE/dracut/pull/354 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228847 https://bugzilla.suse.com/show_bug.cgi?id=1228847#c2 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Antonio Feijoo <antonio.feijoo@suse.com> --- Fix submitted, closing. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228847 https://bugzilla.suse.com/show_bug.cgi?id=1228847#c3 --- Comment #3 from Maintenance Automation <maint-coord+maintenance-robot@suse.de> --- SUSE-RU-2024:3147-1: An update that has two fixes can now be installed. URL: https://www.suse.com/support/update/announcement/2024/suse-ru-20243147-1 Category: recommended (moderate) Bug References: 1228398, 1228847 Maintenance Incident: [SUSE:Maintenance:35341](https://smelt.suse.de/incident/35341/) Sources used: openSUSE Leap 15.6 (src): dracut-059+suse.531.g48487c31-150600.3.6.2 Basesystem Module 15-SP6 (src): dracut-059+suse.531.g48487c31-150600.3.6.2 SUSE Linux Enterprise High Availability Extension 15 SP6 (src): dracut-059+suse.531.g48487c31-150600.3.6.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228847 https://bugzilla.suse.com/show_bug.cgi?id=1228847#c4 --- Comment #4 from Maintenance Automation <maint-coord+maintenance-robot@suse.de> --- SUSE-RU-2024:3146-1: An update that has two fixes can now be installed. URL: https://www.suse.com/support/update/announcement/2024/suse-ru-20243146-1 Category: recommended (moderate) Bug References: 1228398, 1228847 Maintenance Incident: [SUSE:Maintenance:35342](https://smelt.suse.de/incident/35342/) Sources used: openSUSE Leap 15.5 (src): dracut-055+suse.392.g7930ab23-150500.3.24.2 openSUSE Leap Micro 5.5 (src): dracut-055+suse.392.g7930ab23-150500.3.24.2 SUSE Linux Enterprise Micro 5.5 (src): dracut-055+suse.392.g7930ab23-150500.3.24.2 Basesystem Module 15-SP5 (src): dracut-055+suse.392.g7930ab23-150500.3.24.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1228847 https://bugzilla.suse.com/show_bug.cgi?id=1228847#c5 --- Comment #5 from Maintenance Automation <maint-coord+maintenance-robot@suse.de> --- SUSE-RU-2024:3145-1: An update that has one fix can now be installed. URL: https://www.suse.com/support/update/announcement/2024/suse-ru-20243145-1 Category: recommended (moderate) Bug References: 1228847 Maintenance Incident: [SUSE:Maintenance:35343](https://smelt.suse.de/incident/35343/) Sources used: SUSE Linux Enterprise Server 15 SP4 LTSS 15-SP4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Manager Proxy 4.3 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Manager Retail Branch Server 4.3 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Manager Server 4.3 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 openSUSE Leap 15.4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise Micro for Rancher 5.3 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise Micro 5.3 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise Micro for Rancher 5.4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise Micro 5.4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise High Performance Computing LTSS 15 SP4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 SUSE Linux Enterprise Desktop 15 SP4 LTSS 15-SP4 (src): dracut-055+suse.359.geb85610b-150400.3.37.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com