Skip to content

Commit

Permalink
app: Split out /var/{opt,usrlocal} tmpfiles.d entries in separate dropin
Browse files Browse the repository at this point in the history
Prep for not always wanting those entries.
  • Loading branch information
jlebon committed Jan 9, 2024
1 parent 253d361 commit bf01690
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile-rpm-ostree.am
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ librpmostreeinternals_la_CXXFLAGS = $(AM_CXXFLAGS) $(sanitizer_flags) $(rpmostre
librpmostreeinternals_la_LIBADD = $(rpmostree_common_libs)

privdatadir=$(pkglibdir)
privdata_DATA = src/app/rpm-ostree-0-integration.conf
privdata_DATA = src/app/rpm-ostree-0-integration.conf src/app/rpm-ostree-0-integration-opt-usrlocal.conf

# Propagate automake verbose mode
cargo_build = $(cargo) build $(if $(subst 0,,$(V)),--verbose,)
Expand Down
2 changes: 2 additions & 0 deletions src/app/rpm-ostree-0-integration-opt-usrlocal.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
d /var/opt 0755 root root -
d /var/usrlocal 0755 root root -
2 changes: 0 additions & 2 deletions src/app/rpm-ostree-0-integration.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
d /var/home 0755 root root -
d /var/opt 0755 root root -
d /var/srv 0755 root root -
d /var/roothome 0700 root root -
d /var/usrlocal 0755 root root -
d /var/mnt 0755 root root -
d /run/media 0755 root root -
L /var/lib/rpm - - - - ../../usr/share/rpm
Expand Down
6 changes: 6 additions & 0 deletions src/libpriv/rpmostree-postprocess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ postprocess_final (int rootfs_dfd, rpmostreecxx::Treefile &treefile, gboolean un
cancellable, error))
return FALSE;

if (!glnx_file_copy_at (pkglibdir_dfd, "rpm-ostree-0-integration-opt-usrlocal.conf", NULL, rootfs_dfd,
"usr/lib/tmpfiles.d/rpm-ostree-0-integration-opt-usrlocal.conf",
GLNX_FILE_COPY_NOXATTRS, /* Don't take selinux label */
cancellable, error))
return FALSE;

/* Handle kernel/initramfs if we're not doing a container */
if (!container)
{
Expand Down

0 comments on commit bf01690

Please sign in to comment.