Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for artifacts (separate applications/containers/data files) #1301

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

jluebbe
Copy link
Member

@jluebbe jluebbe commented Dec 20, 2023

This is based on the concept we described in #969, but has changed a bit.

  • add more tests
  • resolve TODOs and FIXMEs
  • write documentation

@jluebbe jluebbe added enhancement Adds new functionality or enhanced handling to RAUC needs-tests RFC Early preview of new feature for discussion labels Dec 20, 2023
@jluebbe jluebbe added this to the Planned milestone Dec 20, 2023
@jluebbe jluebbe requested a review from ejoerns December 20, 2023 10:43
@jluebbe jluebbe self-assigned this Dec 20, 2023
Comment on lines +483 to +490
// FIXME acl/xattr seems broken in fakeroot, perhaps use pseudo
//g_ptr_array_add(args, g_strdup("--acl"));
//g_ptr_array_add(args, g_strdup("--selinux"));
//g_ptr_array_add(args, g_strdup("--xattrs"));

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
g_ptr_array_add(args, g_strdup("-all-root"));
g_ptr_array_add(args, g_strdup("-no-xattrs"));
}
//g_ptr_array_add(args, g_strdup("-quiet"));

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
src/install.c Fixed Show fixed Hide fixed
test/bundle.c Fixed Show fixed Hide fixed
test/bundle.c Fixed Show fixed Hide fixed
}

/* update links (commit) */
g_assert(artifact->repo->parent_class == NULL); /* FIXME handle repos with parents, here or somewhere else */

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: handle repos with parents, here or somewhere else
src/install.c Fixed Show fixed Hide fixed
test/bundle.c Fixed Show fixed Hide fixed
test/bundle.c Fixed Show fixed Hide fixed
fixture->repo->description = g_strdup("desc");
fixture->repo->path = g_build_filename(fixture->tmpdir, "repo", NULL);
fixture->repo->type = g_strdup("dummy");
fixture->repo->data_directory = g_build_filename(fixture->tmpdir, "repo", ".data", NULL); /* FIXME Should this have a fixed path? */

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: Should this have a fixed path?
}
}

/* FIXME return full path? */

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: return full path?
Comment on lines +1345 to +1350
//g_message("Updating status for repo '%s'", plan->target_repo->name);
//if (!r_slot_status_save(plan->target_slot, &ierror)) {
// g_propagate_prefixed_error(error, ierror, "Error while writing status file: ");
// return FALSE;
//}

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
@@ -222,8 +224,148 @@
g_clear_pointer(&filepath, g_free);
}

static void check_artifacts(RaucBundle *bundle, BundleData *data)

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 138 lines.
jluebbe added 18 commits May 29, 2024 16:32
We currently prepare the env variables for subprocesses and
shell-parsable output separately. To unify them, handle the shell
quoting at the end, during collection into a string.

Signed-off-by: Jan Luebbe <[email protected]>
This improves the isolation between test cases.

Signed-off-by: Jan Luebbe <[email protected]>
This will allow adding the Artifact Repository documentation on the same
level as Slots.

Signed-off-by: Jan Luebbe <[email protected]>
For now, just add the helper, but don't enable it yet.

Signed-off-by: Jan Luebbe <[email protected]>
These are mainly useful when combined with streaming, so we don't need
to support the in the old plain bundle format.

Signed-off-by: Jan Luebbe <[email protected]>
Perhaps we want to make this configurable later or redirect the output
to a log file.

Signed-off-by: Jan Luebbe <[email protected]>
Follow-up commits will add tests and integration into the existing code.

Signed-off-by: Jan Luebbe <[email protected]>
jluebbe added 15 commits May 29, 2024 17:34
With artifiact repos, this could happen by having a slot and artifact repo with
the same class.

Signed-off-by: Jan Luebbe <[email protected]>
This will help avoid issues cause by running 'rauc bundle' multiple times on
the same input dir. If this breaks current workflows, we may need to create a
temporary copy of the bundle input directory.

Signed-off-by: Jan Luebbe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adds new functionality or enhanced handling to RAUC needs-tests RFC Early preview of new feature for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant