ostree-repo-libarchive.c: major refactor
- Make hardlink handling more generic. The previous strategy worked for tar archives, but not for cpio. It now works for both. - Add support for SEL labeling (through the OstreeRepoCommitModifier) - Add support for xattr_callback (through the OstreeRepoCommitModifier) - Add support for filter (through the OstreeRepoCommitModifier) - Add a use_ostree_convention option Closes: #275 Approved by: cgwalters
This commit is contained in:
parent
6724519080
commit
b1d3dd151c
|
|
@ -36,22 +36,6 @@
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <glib/gprintf.h>
|
#include <glib/gprintf.h>
|
||||||
|
|
||||||
struct OstreeRepoCommitModifier {
|
|
||||||
volatile gint refcount;
|
|
||||||
|
|
||||||
OstreeRepoCommitModifierFlags flags;
|
|
||||||
OstreeRepoCommitFilter filter;
|
|
||||||
gpointer user_data;
|
|
||||||
GDestroyNotify destroy_notify;
|
|
||||||
|
|
||||||
OstreeRepoCommitModifierXattrCallback xattr_callback;
|
|
||||||
GDestroyNotify xattr_destroy;
|
|
||||||
gpointer xattr_user_data;
|
|
||||||
|
|
||||||
OstreeSePolicy *sepolicy;
|
|
||||||
GHashTable *devino_cache;
|
|
||||||
};
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_ostree_repo_ensure_loose_objdir_at (int dfd,
|
_ostree_repo_ensure_loose_objdir_at (int dfd,
|
||||||
const char *loose_path,
|
const char *loose_path,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -40,6 +40,22 @@ typedef enum {
|
||||||
OSTREE_REPO_TEST_ERROR_PRE_COMMIT = (1 << 0)
|
OSTREE_REPO_TEST_ERROR_PRE_COMMIT = (1 << 0)
|
||||||
} OstreeRepoTestErrorFlags;
|
} OstreeRepoTestErrorFlags;
|
||||||
|
|
||||||
|
struct OstreeRepoCommitModifier {
|
||||||
|
volatile gint refcount;
|
||||||
|
|
||||||
|
OstreeRepoCommitModifierFlags flags;
|
||||||
|
OstreeRepoCommitFilter filter;
|
||||||
|
gpointer user_data;
|
||||||
|
GDestroyNotify destroy_notify;
|
||||||
|
|
||||||
|
OstreeRepoCommitModifierXattrCallback xattr_callback;
|
||||||
|
GDestroyNotify xattr_destroy;
|
||||||
|
gpointer xattr_user_data;
|
||||||
|
|
||||||
|
OstreeSePolicy *sepolicy;
|
||||||
|
GHashTable *devino_cache;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OstreeRepo:
|
* OstreeRepo:
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -582,7 +582,9 @@ gboolean ostree_repo_write_archive_to_mtree (OstreeRepo *
|
||||||
typedef struct {
|
typedef struct {
|
||||||
guint ignore_unsupported_content : 1;
|
guint ignore_unsupported_content : 1;
|
||||||
guint autocreate_parents : 1;
|
guint autocreate_parents : 1;
|
||||||
guint reserved : 30;
|
guint use_ostree_convention : 1;
|
||||||
|
guint callback_with_entry_pathname : 1;
|
||||||
|
guint reserved : 28;
|
||||||
|
|
||||||
guint unused_uint[8];
|
guint unused_uint[8];
|
||||||
gpointer unused_ptrs[8];
|
gpointer unused_ptrs[8];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue