From: Michael Tremer Date: Sat, 8 Feb 2025 18:01:58 +0000 (+0000) Subject: OCI: Add an entrypoint to the image X-Git-Tag: 0.9.30~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8031888501d34eed5c99cdf26e4b97675e588707;p=pakfire.git OCI: Add an entrypoint to the image Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/oci.c b/src/pakfire/oci.c index 4059bc53..3914258d 100644 --- a/src/pakfire/oci.c +++ b/src/pakfire/oci.c @@ -198,6 +198,9 @@ static int pakfire_oci_writer_write_config(struct pakfire_oci_writer* self) { size_t size; int r; + struct json_object* config = NULL; + struct json_object* cmd = NULL; + // Make a new object o = pakfire_json_new_object(); if (!o) { @@ -246,6 +249,21 @@ static int pakfire_oci_writer_write_config(struct pakfire_oci_writer* self) { if (r < 0) goto ERROR; + // Add config (yes I know) + r = pakfire_json_add_object(o, "config", &config); + if (r < 0) + goto ERROR; + + // Add command + r = pakfire_json_add_array(config, "Cmd", &cmd); + if (r < 0) + goto ERROR; + + // Add bash + r = pakfire_json_array_add_string(cmd, "bash"); + if (r < 0) + goto ERROR; + // Write as blob r = pakfire_oci_writer_write_json_blob(self, o, &hexdigest, &size); if (r < 0)