[PATCH] Generate os-release from component parts

Dennis Gilmore dennis at ausil.us
Wed Mar 11 16:19:00 UTC 2015


On Wednesday, March 11, 2015 06:31:58 AM Stephen Gallagher wrote:
> > On Mar 10, 2015, at 10:14 PM, Dennis Gilmore <dennis at ausil.us> wrote:
> >> On Tuesday, March 10, 2015 04:22:43 PM Stephen Gallagher wrote:
> >> One of the pieces that we've been missing from the Fedora.next plan
> >> has been a proper way to programmatically identify which Edition a
> >> user has installed. One of the most common approaches has been to use
> >> the /etc/os-release file to handle this, by passing a VARIANT=
> >> variable in its syntax.
> >> 
> >> This patch attempts to accomplish that, while maintaining the spirit
> >> of the move of /etc/os-release into /usr/lib. This patch adds a
> >> systemd service unit and a helper script to generate /etc/os-release
> >> from a simple drop directory.
> >> 
> >> The traditional /etc/os-release is now located at
> >> /usr/lib/os.release.d/00-system.conf and Edition-specific additions to
> >> this are now added to edition-$EDITION.inc and symlinked to 01-
> >> edition.conf.
> >> 
> >> Thus, on every boot, /etc/os-release will be generated from the
> >> contents of /usr/lib/os.release.d. Moreover, this provides us an API
> >> for allowing other packages to supplement /etc/os-release (where
> >> sensible).
> >> 
> >> Comments and criticism welcome; this is a first rough attempt. The
> >> patch attached only applies to Rawhide at this point, but if we decide
> >> it's a good approach prior to F22 Beta, I can write a backport as well.
> > 
> > I am not opposed to doing something, but I am not sure this is right.
> > there is some builds that need /etc/os-release to be present and setup to
> > build.
> Dennis, can you get me some specific examples I can look at and account for?
> Also see below for why this may not be an issue.
https://fedorahosted.org/rel-eng/ticket/6097
this was a issue hit recently because mock was breaking things

> > I
> > think that systemd itself needs /usr/lib/os-release and/or /etc/os-release
> > to be present to actually boot the system.
> 
> Zbigniew, is this accurate? Does systemd need this file on the disk to boot?
> 
> In any case, I think this may not be an issue in the current approach, as
> I'm generating the file at package install time as well at each boot, so
> the previous boot's os-release file will be there.
At the least we need to keep /usr/lib/os-release and I think it being the 
generic non productised version. you removed it entirely 

Dennis
> I do need to change %post to call the script directly instead of using the
> service, though. Otherwise that will fail during anaconda.
> > perhaps we should take the approach that we put /usr/lib/os-release in
> > place and make the /etc/os-release symlink, we have the service provided
> > in fedora- release but disabled. the preset files for the products enable
> > the service and it replaces the symlink at /etc/os-release with a new
> > file that includes the base os definition and the variant definition.
> > 
> > Dennis
> > _______________________________________________
> > rel-eng mailing list
> > rel-eng at lists.fedoraproject.org
> > https://admin.fedoraproject.org/mailman/listinfo/rel-eng
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.fedoraproject.org/pipermail/rel-eng/attachments/20150311/ed12bedf/attachment-0001.sig>


More information about the rel-eng mailing list