jhalfs failure, likely due to malformed DISTRIB_RELEASE parsing in MLFS (extra quote inserted)

"Eric Clothier" ([email protected] via alfs-discuss Mailing List) <[email protected]> Wed, 22 Apr 2026 18:41:51 -0400
Newsgroups gmane.linux.lfs.automated
Message-ID <CAAGwWFVF4qucT5VEbQU7RRDJgcZj224+UAXTzsLPwyW+yfkymA@mail.gmail.com>
This is a multi-part message in MIME format...

------------=_1776897732-1253-25546
Content-Type: multipart/alternative; boundary="000000000000984f300650143d57"

--000000000000984f300650143d57
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello,

I recently completed a jhalfs build using the multilib (MLFS) branch and
encountered a failure at the very end of the process. The issue appears to
be caused by malformed parsing of DISTRIB_RELEASE, resulting in an extra
double quote being inserted into generated scripts, which causes bash to
fail with an unmatched quote error.

Build configuration:

MLFS (multilib) pulled from git
systemd init
BLFS included (also from git)
jhalfs multilib set to i686

Local modifications:

Replaced static IP configuration in Chapter 9 with DHCP setup
(systemd-networkd, per LFS/MLFS systemd book)
Added a custom package for GPU and CPU microcode firmware prior to kernel
build

These changes do not appear related, as the failure occurs during the final
cleanup stage after BLFS tool dependencies are built.

Error output:

 Target 022-z-sudo OK
---------------------------------------------------------------------------=
-----

---------------------------------------------------------------------------=
-----
 Build complete for the package  and its dependencies

Updating the tracking file


 Target update OK
---------------------------------------------------------------------------=
-----
make: Leaving directory '/blfs_root/work'
umount: /mnt/build_dir/dev/pts unmounted
umount: /mnt/build_dir/dev/shm unmounted
umount: /mnt/build_dir/dev unmounted
umount: /mnt/build_dir/run unmounted
umount: /mnt/build_dir/proc unmounted
umount: /mnt/build_dir/sys unmounted
removed '/mnt/build_dir/etc/resolv.conf'
/bin/bash: -c: line 1: unexpected EOF while looking for matching `"'
make: *** [Makefile:61: all] Error 2
make: Leaving directory '/mnt/build_dir/jhalfs'


Problematic section from generated Makefile
(/mnt/build_dir/jhalfs/Makefile):

@sudo env LFS=3D$(MOUNT_PT) kernfs-scripts/teardown.sh
@sudo rm -v $(MOUNT_PT)/etc/resolv.conf
@sudo make do_housekeeping
@echo "MLFS > lfs-release && \
sudo mv lfs-release $(MOUNT_PT)/etc && \
sudo chown root:root $(MOUNT_PT)/etc/lfs-release
@/bin/echo -e -n \
DISTRIB_ID=3D\"Linux From Scratch\"\\n\
DISTRIB_RELEASE=3D\""MLFS\"\\n\
DISTRIB_CODENAME=3D\"shane87-jhalfs\"\\n\
DISTRIB_DESCRIPTION=3D\"Linux From Scratch\"\\n\
> lsb-release && \
sudo mv lsb-release $(MOUNT_PT)/etc && \
sudo chown root:root $(MOUNT_PT)/etc/lsb-release
@/bin/echo -e -n \
NAME=3D\"Linux From Scratch\"\\n\
VERSION=3D\""MLFS\"\\n\
ID=3Dlfs\\n\
PRETTY_NAME=3D\"Linux From Scratch MLFS\"\\n\
VERSION_CODENAME=3D\"shane87-jhalfs\"\\n\

Each instance of MLFS is prefixed with an extra double quote (""MLFS"),
which results in broken quoting and causes bash to error out.

It appears that in the MLFS branch, DISTRIB_RELEASE has been modified to
prepend "MLFS " (note the trailing space) to the version string. The space
seems to be causing improper tokenization or quoting when parsed by jhalfs
in LFS/master.sh, resulting in the extra embedded quote, and no version
identifier to be included (beyond the string MLFS).

Manually removing the leading quote (changing ""MLFS" to "MLFS") in the
generated Makefile allows the build to complete successfully.

Is this something that should be handled in jhalfs parsing logic, or should
I report this to the MLFS team?

I=E2=80=99m happy to help test a fix if needed.

Thanks,
Eric

--000000000000984f300650143d57
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<br><br>I recently completed a jhalfs build using th=
e multilib (MLFS) branch and encountered a failure at the very end of the p=
rocess. The issue appears to be caused by malformed parsing of DISTRIB_RELE=
ASE, resulting in an extra double quote being inserted into generated scrip=
ts, which causes bash to fail with an unmatched quote error.<br><br>Build c=
onfiguration:<br><br>MLFS (multilib) pulled from git<br>systemd init<br>BLF=
S included (also from git)<br>jhalfs multilib set to i686<br><br>Local modi=
fications:<br><br>Replaced static IP configuration in Chapter 9 with DHCP s=
etup (systemd-networkd, per LFS/MLFS systemd book)<br>Added a custom packag=
e for GPU and CPU microcode firmware prior to kernel build<br><br>These cha=
nges do not appear related, as the failure occurs during the final cleanup =
stage after BLFS tool dependencies are built.<br><br><div>Error output:</di=
v><br><div>=C2=A0Target 022-z-sudo OK<br>----------------------------------=
----------------------------------------------<br><br>---------------------=
-----------------------------------------------------------<br>=C2=A0Build =
complete for the package =C2=A0and its dependencies<br><br>Updating the tra=
cking file<br><br><br>=C2=A0Target update OK<br>---------------------------=
-----------------------------------------------------<br>make: Leaving dire=
ctory &#39;/blfs_root/work&#39;<br>umount: /mnt/build_dir/dev/pts unmounted=
<br>umount: /mnt/build_dir/dev/shm unmounted<br>umount: /mnt/build_dir/dev =
unmounted<br>umount: /mnt/build_dir/run unmounted<br>umount: /mnt/build_dir=
/proc unmounted<br>umount: /mnt/build_dir/sys unmounted<br>removed &#39;/mn=
t/build_dir/etc/resolv.conf&#39;<br>/bin/bash: -c: line 1: unexpected EOF w=
hile looking for matching `&quot;&#39;<br>make: *** [Makefile:61: all] Erro=
r 2<br>make: Leaving directory &#39;/mnt/build_dir/jhalfs&#39;</div><div><b=
r></div><div><br>Problematic section from generated Makefile (/mnt/build_di=
r/jhalfs/Makefile):</div><div><br>	@sudo env LFS=3D$(MOUNT_PT) kernfs-scrip=
ts/teardown.sh<br>	@sudo rm -v $(MOUNT_PT)/etc/resolv.conf<br>	@sudo make d=
o_housekeeping<br>	@echo &quot;MLFS &gt; lfs-release &amp;&amp; \<br>	sudo =
mv lfs-release $(MOUNT_PT)/etc &amp;&amp; \<br>	sudo chown root:root $(MOUN=
T_PT)/etc/lfs-release<br>	@/bin/echo -e -n \<br>	DISTRIB_ID=3D\&quot;Linux =
From Scratch\&quot;\\n\<br>	DISTRIB_RELEASE=3D\&quot;&quot;MLFS\&quot;\\n\<=
br>	DISTRIB_CODENAME=3D\&quot;shane87-jhalfs\&quot;\\n\<br>	DISTRIB_DESCRIP=
TION=3D\&quot;Linux From Scratch\&quot;\\n\<br>	&gt; lsb-release &amp;&amp;=
 \<br>	sudo mv lsb-release $(MOUNT_PT)/etc &amp;&amp; \<br>	sudo chown root=
:root $(MOUNT_PT)/etc/lsb-release<br>	@/bin/echo -e -n \<br>	NAME=3D\&quot;=
Linux From Scratch\&quot;\\n\<br>	VERSION=3D\&quot;&quot;MLFS\&quot;\\n\<br=
>	ID=3Dlfs\\n\<br>	PRETTY_NAME=3D\&quot;Linux From Scratch MLFS\&quot;\\n\<=
br>	VERSION_CODENAME=3D\&quot;shane87-jhalfs\&quot;\\n\<br><br></div>Each i=
nstance of MLFS is prefixed with an extra double quote (&quot;&quot;MLFS&qu=
ot;), which results in broken quoting and causes bash to error out.<br><br>=
It appears that in the MLFS branch, DISTRIB_RELEASE has been modified to pr=
epend &quot;MLFS &quot; (note the trailing space) to the version string. Th=
e space seems to be causing improper tokenization or quoting when parsed by=
 jhalfs=C2=A0 in LFS/master.sh, resulting in the extra embedded quote, and =
no version identifier to be included (beyond the string MLFS).<br><br>Manua=
lly removing the leading quote (changing &quot;&quot;MLFS&quot; to &quot;ML=
FS&quot;) in the generated Makefile allows the build to complete successful=
ly.<br><br>Is this something that should be handled in jhalfs parsing logic=
, or should I report this to the MLFS team?<br><br>I=E2=80=99m happy to hel=
p test a fix if needed.<br><br>Thanks,<br>Eric</div>

--000000000000984f300650143d57--

------------=_1776897732-1253-25546
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
------------=_1776897732-1253-25546--