Skip to content

feat: use tmpfiles.d for setup and temp dir#15

Open
HastD wants to merge 1 commit intosecureblue:mainfrom
HastD:tmpfiles
Open

feat: use tmpfiles.d for setup and temp dir#15
HastD wants to merge 1 commit intosecureblue:mainfrom
HastD:tmpfiles

Conversation

@HastD
Copy link
Collaborator

@HastD HastD commented Feb 11, 2026

  • Replace brew-setup.service with tmpfiles.d configuration that copies /usr/share/homebrew/.linuxbrew to /home/linuxbrew/.linuxbrew.
  • Move Homebrew temporary directory to /var/tmp/homebrew and manage this directory with tmpfiles.d. This will make the Homebrew installation easier to sandbox in the future as it only needs access /var/tmp/homebrew instead of all of /var/tmp.

Note, the change to Homebrew setup will require a corresponding change to the secureblue ujust script for disabling Homebrew.

@HastD HastD requested a review from RoyalOughtness February 11, 2026 13:56
HastD added a commit to HastD/secureblue that referenced this pull request Feb 11, 2026
With secureblue/homebrew#15, Homebrew setup uses tmpfiles.d instead of a
systemd service unit to create the `/home/linuxbrew/.linuxbrew`
directory. The `ujust set-brew` script needs to be changed to match.
* Replace `brew-setup.service` with tmpfiles.d configuration that copies
  `/usr/share/homebrew/.linuxbrew` to `/home/linuxbrew/.linuxbrew`.
* Move Homebrew temporary directory to `/var/tmp/homebrew` and manage
  this directory with tmpfiles.d. This will make the Homebrew
  installation easier to sandbox in the future as it only needs access
  `/var/tmp/homebrew` instead of all of `/var/tmp`.
HastD added a commit to HastD/secureblue that referenced this pull request Feb 13, 2026
With secureblue/homebrew#15, Homebrew setup uses tmpfiles.d instead of a
systemd service unit to create the `/home/linuxbrew/.linuxbrew`
directory. The `ujust set-brew` script needs to be changed to match.

To ensure the Homebrew installation is *not* recreated for users who
have opted out with `ujust set-brew off`, we override this tmpfiles.d
config file by default by creating an empty
`/etc/tmpfiles.d/homebrew.conf`, and add a systemd service
`brew-setup-migration.service` that removes this override if the stamp
`/etc/.linuxbrew` used by the old Homebrew setup method is present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant