Skip to content

Commit

Permalink
importer: Don't import libselinux .LOCK files
Browse files Browse the repository at this point in the history
These shouldn't be in the package; the fact that they're empty
files causes libostree to hardlink them which breaks things.
See also #1002
  • Loading branch information
cgwalters committed Oct 10, 2018
1 parent 62046c2 commit 1585b04
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/libpriv/rpmostree-importer.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,16 @@ compose_filter_cb (OstreeRepo *repo,
}
}

/* Special case exemptions */
if (g_str_has_prefix (path, "/usr/etc/selinux") &&
g_str_has_suffix (path, ".LOCK"))
{
/* These empty lock files cause problems;
* https://github.com/projectatomic/rpm-ostree/pull/1002
*/
return OSTREE_REPO_COMMIT_FILTER_SKIP;
}
/* convert /run and /var entries to tmpfiles.d */
if (g_str_has_prefix (path, "/" VAR_SELINUX_TARGETED_PATH))
; /* Handled by pathname translation */
else if (g_str_has_prefix (path, "/run/") ||
g_str_has_prefix (path, "/var/"))
{
Expand Down

0 comments on commit 1585b04

Please sign in to comment.