repo+tests: Add [core]disable-xattrs=true, use it on overlayfs
There are a lot of things suboptimal about this approach, but on the other hand we need to get our CI back up and running. The basic approach is to - in the test suite, detect if we're on overlayfs. If so, set a flag in the repo, which gets picked up by a few strategic places in the core to turn on "ignore xattrs". I also had to add a variant of this for the sysroot work. The core problem here is while overlayfs will let us read and see the SELinux labels, it won't let us write them. Down the line, we should improve this so that we can selectively ignore e.g. `security.*` attributes but not `user.*` say. Closes: https://github.com/ostreedev/ostree/issues/758 Closes: #759 Approved by: jlebon
This commit is contained in:
1 parent
4d873389f0
commit
455cc5e892
40 files changed
+208
-122
No files matched your search
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "libglnx.h"
|
||||
#include "ostree.h"
|
||||
#include "ostree-repo-private.h"
|
||||
#include "otutil.h"
|
||||
|
||||
static gboolean
|
||||
@@ -269,6 +270,19 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags,
|
||||
if (!options)
|
||||
options = &default_opts;
|
||||
|
||||
/* If we're diffing versus a repo, and either of them have xattrs disabled,
|
||||
* then disable for both.
|
||||
*/
|
||||
OstreeRepo *repo;
|
||||
if (OSTREE_IS_REPO_FILE (a))
|
||||
repo = ostree_repo_file_get_repo ((OstreeRepoFile*)a);
|
||||
else if (OSTREE_IS_REPO_FILE (b))
|
||||
repo = ostree_repo_file_get_repo ((OstreeRepoFile*)b);
|
||||
else
|
||||
repo = NULL;
|
||||
if (repo != NULL && repo->disable_xattrs)
|
||||
flags |= OSTREE_DIFF_FLAGS_IGNORE_XATTRS;
|
||||
|
||||
if (a == NULL)
|
||||
{
|
||||
if (!diff_add_dir_recurse (b, added, cancellable, error))
|
||||
|
||||
Reference in new issue
Block a user