Skip to content

Commit

Permalink
treefile: Deprecate initramfs-args key
Browse files Browse the repository at this point in the history
Users should use `/etc/dracut.conf.d` instead. This option does not work
when regenerating the initramfs in the container flow.

We'll want to keep supporting it internally for a while in the upgrade
code, until all known composers have moved away from it, and reasonably
enough time for client systems to get the resulting updated trees.

See discussions in coreos#3799.
  • Loading branch information
jlebon committed Jul 8, 2022
1 parent 25ec637 commit 5570860
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/treefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ It supports the following parameters:
case for this with Dracut is `--filesystems xfs,ext4` to ensure
specific filesystem drivers are included. If not specified,
`--no-hostonly` will be used.
Deprecated; you should place files in `/etc/dracut.conf.d` instead. This
option is ignored when regenerating the initramfs in the container flow.

* `rpmdb`: String, optional: The RPM database backend. Can be one of
`target` (the default) or `host`. Legacy values
Expand Down
2 changes: 2 additions & 0 deletions src/daemon/rpmostree-sysroot-upgrader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,8 @@ perform_local_assembly (RpmOstreeSysrootUpgrader *self, GCancellable *cancellabl
/* append the extra args */
rust::Vec<rust::String> add_dracut_argv;
if (rpmostree_origin_get_regenerate_initramfs (self->computed_origin))
/* Note this option is deprecated, but we still read it for now. See
* https://github.com/coreos/rpm-ostree/issues/3799. */
add_dracut_argv = rpmostree_origin_get_initramfs_args (self->computed_origin);
for (auto &arg : add_dracut_argv)
g_ptr_array_add (initramfs_args, g_strdup (arg.c_str ()));
Expand Down
1 change: 1 addition & 0 deletions src/libpriv/rpmostree-postprocess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ process_kernel_and_initramfs (int rootfs_dfd, rpmostreecxx::Treefile &treefile,
rust::Vec<rust::String> initramfs_args = treefile.get_initramfs_args ();
if (!initramfs_args.empty ())
{
g_printerr ("note: initramfs-args is deprecated, use /etc/dracut.conf.d instead\n");
for (auto &arg : initramfs_args)
g_ptr_array_add (dracut_argv, (void *)arg.c_str ());
}
Expand Down

0 comments on commit 5570860

Please sign in to comment.