Skip to content

Commit

Permalink
core: Add OSTREE_COMMIT_META_KEY_ARCH
Browse files Browse the repository at this point in the history
Add a standard key for this.  We actually had a case in OpenShift
builds recently where a ppc64le image was pushed over an `x86_64`
one and this started failing at runtime with a not immediately
obvious error.

I'll probably end up changing rpm-ostree at least to use
the RPM architecture for this key and fail if it doesn't match
the booted value.

Possibly that should live in ostree but it would involve adding
architecture schema here, which gets into a big mess.  Let's
just standardize the key.
  • Loading branch information
cgwalters committed Jun 3, 2020
1 parent 2598612 commit 99ec7d1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/libostree/ostree-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@ typedef enum {
* Since: 2014.9
*/
#define OSTREE_COMMIT_META_KEY_VERSION "version"

/**
* OSTREE_COMMIT_META_KEY_ARCH:
*
* GVariant type `s`. Architecture; this is a freeform string, and some distributions
* which have existing package managers might want to match that schema. It's recommended
* to use e.g. `uname -m` by default (i.e. the Linux kernel schema). In the future
* ostree might include a builtin function to compare architectures.
*
* Since: 2020.4
*/
#define OSTREE_COMMIT_META_KEY_ARCH "ostree.arch"

/**
* OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE:
*
Expand Down

0 comments on commit 99ec7d1

Please sign in to comment.