#include "ostree.h"
#include "ostree-core-private.h"
#include "ostree-repo-private.h"
+#include "ostree-sepolicy-private.h"
#include "ostree-repo-file-enumerator.h"
#include "ostree-checksum-input-stream.h"
#include "ostree-varint.h"
{
g_autoptr(GVariantBuilder) builder = NULL;
+ if (ret_xattrs)
+ {
+ /* drop out any existing SELinux policy from the set, so we don't end up
+ * counting it twice in the checksum */
+ g_autoptr(GVariant) new_ret_xattrs = NULL;
+ new_ret_xattrs = _ostree_filter_selinux_xattr (ret_xattrs);
+ g_variant_unref (ret_xattrs);
+ ret_xattrs = g_steal_pointer (&new_ret_xattrs);
+ }
+
/* ret_xattrs may be NULL */
builder = ot_util_variant_builder_from_variant (ret_xattrs,
G_VARIANT_TYPE ("a(ayay)"));
--selinux-policy co --tree=dir=co
ostree --repo=/ostree/repo ls -X testbranch /usr/bin/foo-a-generic-binary > ls.txt
assert_file_has_content ls.txt ${oldcon}
+ostree --repo=/ostree/repo fsck
ostree --repo=/ostree/repo refs --delete testbranch
rm co -rf