Re: jhalfs failure, likely due to malformed DISTRIB_RELEASE parsing in MLFS (extra quote inserted)
"Pierre Labastie" ([email protected] via alfs-discuss Mailing List) <[email protected]> Thu, 23 Apr 2026 16:13:20 +0200
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format...
------------=_1776953616-1253-25615
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Wed, 2026-04-22 at 18:41 -0400, Eric Clothier wrote:
> Hello,
>=20
> 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.
>=20
> Build configuration:
>=20
> MLFS (multilib) pulled from git
> systemd init
> BLFS included (also from git)
> jhalfs multilib set to i686
>=20
> Local modifications:
>=20
> 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
>=20
> These changes do not appear related, as the failure occurs during the
> final cleanup stage after BLFS tool dependencies are built.
>=20
> Error output:
>=20
> =C2=A0Target 022-z-sudo OK
> ---------------------------------------------------------------------
> -----------
>=20
> ---------------------------------------------------------------------
> -----------
> =C2=A0Build complete for the package =C2=A0and its dependencies
>=20
> Updating the tracking file
>=20
>=20
> =C2=A0Target 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'
>=20
>=20
> Problematic section from generated Makefile
> (/mnt/build_dir/jhalfs/Makefile):
>=20
> =C2=A0@sudo env LFS=3D$(MOUNT_PT) kernfs-scripts/teardown.sh
> =C2=A0@sudo rm -v $(MOUNT_PT)/etc/resolv.conf
> =C2=A0@sudo make do_housekeeping
> =C2=A0@echo "MLFS > lfs-release && \
> =C2=A0sudo mv lfs-release $(MOUNT_PT)/etc && \
> =C2=A0sudo chown root:root $(MOUNT_PT)/etc/lfs-release
> =C2=A0@/bin/echo -e -n \
> =C2=A0DISTRIB_ID=3D\"Linux From Scratch\"\\n\
> =C2=A0DISTRIB_RELEASE=3D\""MLFS\"\\n\
> =C2=A0DISTRIB_CODENAME=3D\"shane87-jhalfs\"\\n\
> =C2=A0DISTRIB_DESCRIPTION=3D\"Linux From Scratch\"\\n\
> =C2=A0> lsb-release && \
> =C2=A0sudo mv lsb-release $(MOUNT_PT)/etc && \
> =C2=A0sudo chown root:root $(MOUNT_PT)/etc/lsb-release
> =C2=A0@/bin/echo -e -n \
> =C2=A0NAME=3D\"Linux From Scratch\"\\n\
> =C2=A0VERSION=3D\""MLFS\"\\n\
> =C2=A0ID=3Dlfs\\n\
> =C2=A0PRETTY_NAME=3D\"Linux From Scratch MLFS\"\\n\
> =C2=A0VERSION_CODENAME=3D\"shane87-jhalfs\"\\n\
>=20
> Each instance of MLFS is prefixed with an extra double quote
> (""MLFS"), which results in broken quoting and causes bash to error
> out.
>=20
> 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=C2=A0 in LFS/master.sh, resulting in the extra embedded
> quote, and no version identifier to be included (beyond the string
> MLFS).
>=20
> Manually removing the leading quote (changing ""MLFS" to "MLFS") in
> the generated Makefile allows the build to complete successfully.
>=20
> Is this something that should be handled in jhalfs parsing logic, or
> should I report this to the MLFS team?
>=20
> I=E2=80=99m happy to help test a fix if needed.
>=20
Thanks for the detailed report. I think it is time to just extract
chapter11/theend to a scriptlet and run it as part of the build,
instead of generating it in the Makefile. I'll work on that.
I'm not sure whether the VERSION variable is used elsewhere. But "for
sure", the code to generate it is not good for the multilib branch.
Regards
Pierre
------------=_1776953616-1253-25615
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
------------=_1776953616-1253-25615--