Skip to content

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

Merged
RoyalOughtness merged 1 commit intosecureblue:mainfrom
HastD:tmpfiles
Feb 27, 2026
Merged

feat: use tmpfiles.d for setup and temp dir#15
RoyalOughtness merged 1 commit intosecureblue:mainfrom
HastD:tmpfiles

Conversation

@HastD
Copy link
Copy Markdown
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.
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.
* 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`.
@RoyalOughtness RoyalOughtness merged commit a9d61aa into secureblue:main Feb 27, 2026
7 checks passed
HastD added a commit to HastD/secureblue that referenced this pull request Feb 27, 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.
HastD added a commit to HastD/secureblue that referenced this pull request Feb 27, 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.
@HastD HastD deleted the tmpfiles branch March 1, 2026 16:16
HastD added a commit to secureblue/secureblue that referenced this pull request Mar 2, 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.

2 participants