From b737fbd23594596b71a3b8b3341fc378068f4d95 Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sat, 11 Jan 2025 00:04:55 -0300 Subject: [PATCH 1/2] chore: move homebrew configuration to ublue-brew --- packages.json | 1 + .../etc/profile.d/brew-bash-completion.sh | 25 ------------------- .../etc/security/limits.d/30-brew-limits.conf | 9 ------- ...ebrew.preset => 02-homebrew-update.preset} | 0 .../usr/lib/systemd/system/brew-setup.service | 18 ------------- .../shared/usr/lib/tmpfiles.d/homebrew.conf | 3 --- .../usr/share/fish/vendor_conf.d/brew.fish | 13 ---------- 7 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 system_files/shared/etc/profile.d/brew-bash-completion.sh delete mode 100644 system_files/shared/etc/security/limits.d/30-brew-limits.conf rename system_files/shared/usr/lib/systemd/system-preset/{01-homebrew.preset => 02-homebrew-update.preset} (100%) delete mode 100644 system_files/shared/usr/lib/systemd/system/brew-setup.service delete mode 100644 system_files/shared/usr/lib/tmpfiles.d/homebrew.conf delete mode 100644 system_files/shared/usr/share/fish/vendor_conf.d/brew.fish diff --git a/packages.json b/packages.json index 9ab39988f5a..75aba4d3643 100644 --- a/packages.json +++ b/packages.json @@ -56,6 +56,7 @@ "tailscale", "tmux", "usbmuxd", + "ublue-brew", "wireguard-tools", "xprop", "wl-clipboard", diff --git a/system_files/shared/etc/profile.d/brew-bash-completion.sh b/system_files/shared/etc/profile.d/brew-bash-completion.sh deleted file mode 100644 index 424ac4ad1bc..00000000000 --- a/system_files/shared/etc/profile.d/brew-bash-completion.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# shellcheck shell=sh disable=SC1091,SC2039,SC2166 -# Check for interactive bash and that we haven't already been sourced. -if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BREW_BASH_COMPLETION-}" = x ]; then - - # Check for recent enough version of bash. - if [ "${BASH_VERSINFO[0]}" -gt 4 ] || - [ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then - if [ -w /home/linuxbrew/.linuxbrew ]; then - if ! test -L /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew; then - /home/linuxbrew/.linuxbrew/bin/brew completions link > /dev/null - fi - fi - if test -d /home/linuxbrew/.linuxbrew/etc/bash_completion.d; then - for rc in /home/linuxbrew/.linuxbrew/etc/bash_completion.d/*; do - if test -r "$rc"; then - . "$rc" - fi - done - unset rc - fi - fi - BREW_BASH_COMPLETION=1 - export BREW_BASH_COMPLETION -fi diff --git a/system_files/shared/etc/security/limits.d/30-brew-limits.conf b/system_files/shared/etc/security/limits.d/30-brew-limits.conf deleted file mode 100644 index 45d18f45758..00000000000 --- a/system_files/shared/etc/security/limits.d/30-brew-limits.conf +++ /dev/null @@ -1,9 +0,0 @@ -#This file sets the resource limits for the users logged in via PAM, -#more specifically, users logged in on via SSH or tty (console). -#Limits related to terminals in Wayland/Xorg sessions depend on a -#change to /etc/systemd/user.conf. -#This does not affect resource limits of the system services. -#This file overrides defaults set in /etc/security/limits.conf - -* soft nofile 4096 -root soft nofile 4096 diff --git a/system_files/shared/usr/lib/systemd/system-preset/01-homebrew.preset b/system_files/shared/usr/lib/systemd/system-preset/02-homebrew-update.preset similarity index 100% rename from system_files/shared/usr/lib/systemd/system-preset/01-homebrew.preset rename to system_files/shared/usr/lib/systemd/system-preset/02-homebrew-update.preset diff --git a/system_files/shared/usr/lib/systemd/system/brew-setup.service b/system_files/shared/usr/lib/systemd/system/brew-setup.service deleted file mode 100644 index 98fa5d65048..00000000000 --- a/system_files/shared/usr/lib/systemd/system/brew-setup.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Setup Brew -Wants=network-online.target -After=network-online.target -ConditionPathExists=!/etc/.linuxbrew -ConditionPathExists=!/var/home/linuxbrew/.linuxbrew - -[Service] -Type=oneshot -ExecStart=/usr/bin/mkdir -p /tmp/homebrew -ExecStart=/usr/bin/tar --zstd -xvf /usr/share/homebrew.tar.zst -C /tmp/homebrew -ExecStart=/usr/bin/cp -R -n /tmp/homebrew/home/linuxbrew/.linuxbrew /var/home/linuxbrew -ExecStart=/usr/bin/chown -R 1000:1000 /var/home/linuxbrew -ExecStart=/usr/bin/rm -rf /tmp/homebrew -ExecStart=/usr/bin/touch /etc/.linuxbrew - -[Install] -WantedBy=default.target multi-user.target diff --git a/system_files/shared/usr/lib/tmpfiles.d/homebrew.conf b/system_files/shared/usr/lib/tmpfiles.d/homebrew.conf deleted file mode 100644 index 92cd2fd8a66..00000000000 --- a/system_files/shared/usr/lib/tmpfiles.d/homebrew.conf +++ /dev/null @@ -1,3 +0,0 @@ -d /var/lib/homebrew 0755 1000 1000 - - -d /var/cache/homebrew 0755 1000 1000 - - -d /var/home/linuxbrew 0755 1000 1000 - - diff --git a/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish b/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish deleted file mode 100644 index bb6d10d8889..00000000000 --- a/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/fish -#shellcheck disable=all -if status --is-interactive - if [ -d /home/linuxbrew/.linuxbrew ] - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - if test -d (brew --prefix)/share/fish/completions - set -p fish_complete_path (brew --prefix)/share/fish/completions - end - if test -d (brew --prefix)/share/fish/vendor_completions.d - set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d - end - end -end From a0a49850754dfe16cf9327deb1e6d3541595335b Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sat, 11 Jan 2025 13:01:21 -0300 Subject: [PATCH 2/2] fix: brew-setup is already covered by the ublue-brew package --- .../usr/lib/systemd/system-preset/02-homebrew-update.preset | 1 - 1 file changed, 1 deletion(-) diff --git a/system_files/shared/usr/lib/systemd/system-preset/02-homebrew-update.preset b/system_files/shared/usr/lib/systemd/system-preset/02-homebrew-update.preset index 0d29503e589..ff7342b8406 100644 --- a/system_files/shared/usr/lib/systemd/system-preset/02-homebrew-update.preset +++ b/system_files/shared/usr/lib/systemd/system-preset/02-homebrew-update.preset @@ -1,3 +1,2 @@ -enable brew-setup.service enable brew-update.timer enable brew-upgrade.timer