Skip to main content

org.osbuild.ostree.preptree

Transforms the tree to an ostree layout

Creates a basic fs tree in OSTree layout[1] from scratch and then picks the relevenat bits from the tree and moves them over. Then uses rpm-ostree compose to transform a "normal" file system tree into an OSTree conforming layout (see [1]). Among other things the main steps are:

  • moves /etc to /usr/etc
  • move /boot to /usr/lib/ostree-boot
  • potentially moving /var/lib/rpm
  • re-creates the initramfs (via dracut)
  • adds altfiles module to NSS
  • Re-compiles SELinux policy (semodule -nB)
  • Migrates /usr/etc/{passwd, group} to /usr/lib/
  • Postprocess SELinux policy
  • Convert /var to use tmpfiles.d
  • Prepares symlinks
    • /usr/local -> /var/usrlocal
    • /var/lib/alternatives -> /usr/lib/alternatives
    • /var/lib/vagrant -> /usr/lib/vagrant
  • copies the rpmdb The configuration options, etc_group_members corresponds to the Treefile[2] option of rpm-ostree. In brief: The groups mentioned in etc_group_members will be stored in /etc/groups instead of /usr/etc/groups (which is read-only). Therefore all groups that human users need to be part of. [1] https://ostreedev.github.io/ostree/adapting-existing/ [2] https://rpm-ostree.readthedocs.io/en/latest/manual/treefile/

Schema 1

{
"additionalProperties": false,
"properties": {
"etc_group_members": {
"description": "Array of group names to still keep in /etc/group",
"type": "array",
"items": {
"type": "string"
}
},
"initramfs-args": {
"description": "Array of arguments passed to dracut",
"type": "array",
"items": {
"type": "string"
}
},
"tmp-is-dir": {
"description": "Create a regular directory for /tmp",
"type": "boolean",
"default": true
}
}
}

Schema 2

{}