Bug 9144

Summary: os-release is not formatted as specified in standard
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Gatis Paeglis <gatis.paeglis>
Component: meta-yoctoAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: bluelightning, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Gatis Paeglis 2016-02-19 08:43:40 UTC
os-release spec: https://www.freedesktop.org/software/systemd/man/os-release.html

"Variable assignment values must be enclosed in double or single quotes if they include spaces, semicolons or other special characters outside of A–Z, a–z, 0–9."

So one line needs to be changed in os-release.bb
From:  f.write('{0}={1}\n'.format(field, value))
To:    f.write('{0}="{1}"\n'.format(field, value))

Some tools might fail to read the file properly. Dracut for example prints warnings when parsing os-release file.
Comment 1 Paul Eggleton 2016-02-21 20:11:03 UTC
This has already been fixed in master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4b29c802857e84d50b869c9f9f6bfdff002b15fa

You haven't specified the version you're using but I would assume it's a stable release; perhaps we can backport it if you let us know.
Comment 2 Gatis Paeglis 2016-02-23 08:09:13 UTC
Backporting to jethro branch would be great. Thanks.
Comment 3 Paul Eggleton 2016-02-24 20:30:56 UTC
FYI I've sent out the backport for review.
Comment 4 Paul Eggleton 2016-03-21 00:52:52 UTC
Just to follow up on this, FYI the backport got merged to the jethro branch a week or so ago:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=jethro&id=6e32be7c7b19b649e5cac8407650979aae65ef26