Skip to content

Commit

Permalink
Merge pull request #3548 from cgwalters/compose-extensions-incontaine…
Browse files Browse the repository at this point in the history
…r-fixup
  • Loading branch information
jlebon authored Mar 28, 2022
2 parents e1df3ec + 9a92d34 commit b599c68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ file describing OS extensions (packages) and a base OSTree
commit. After performing a depsolve, it downloads the
extension packages and places them in an output directory.

This can then be used as part of the same (or related)
pipeline that runs `rpm-ostree compose tree` to ship
extension packages.

## extensions.yaml

The format of the `extensions.yaml` file is as follow:
Expand Down
7 changes: 7 additions & 0 deletions src/app/rpmostree-compose-builtin-tree.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,12 @@ rpmostree_compose_builtin_extensions (int argc, char **argv, RpmOstreeCommandInv
return FALSE;
}

if (opt_repo && opt_extensions_rootfs)
{
rpmostree_usage_error (context, "--repo must not be specified with --rootfs", error);
return FALSE;
}

const char *treefile_path = argv[1];
const char *extensions_path = argv[2];

Expand All @@ -1491,6 +1497,7 @@ rpmostree_compose_builtin_extensions (int argc, char **argv, RpmOstreeCommandInv
// If we're in a running rootfs, we don't need a repo, so make up a fake one for now.
if (opt_extensions_rootfs)
{
g_assert (!opt_repo);
if (!glnx_mkdtempat (AT_FDCWD, "/tmp/tmprepo.XXXXX", 0700, &tmp_repo, error))
return glnx_prefix_error (error, "Creating temporary repo dir");
repo = ostree_repo_create_at (tmp_repo.fd, tmp_repo.path, OSTREE_REPO_MODE_BARE_USER, NULL,
Expand Down

0 comments on commit b599c68

Please sign in to comment.