# SPDX-FileCopyrightText: Copyright 2026 Daniel Hast # # SPDX-License-Identifier: Apache-2.0 # The homebrew repo contains some files with invalid rpaths, but they're just test files # that aren't used by anything at runtime. %global __brp_check_rpaths %{nil} # Skip steps that could modify the contents of the homebrew repo. %global __brp_add_determinism /usr/bin/true %global __brp_linkdupes /usr/bin/true %global __brp_mangle_shebangs %{nil} %global debug_package %{nil} %define homebrew_installer_commit 90fa3d5881cedc0d60c4a3cc5babdb867ef42e5a %define build_timestamp %(date -u '+%%y%%m%%d%%H') %global proxy_dbus_name sh.brew.BrewProxy Name: homebrew Version: 5.1.4 Release: %{build_timestamp} Summary: The Missing Package Manager for macOS (or Linux) License: Apache-2.0 AND BSD-2-Clause URL: https://github.com/secureblue/homebrew Source0: homebrew-5.1.4.tar.gz Source1: homebrew-install.sh Source2: homebrew-brew-git.tar.gz BuildRequires: curl >= 7.41.0 BuildRequires: git-core >= 2.7.0 BuildRequires: cargo-rpm-macros BuildRequires: systemd-rpm-macros Requires: curl >= 7.41.0 Requires: gcc Requires: git-core >= 2.7.0 Requires: zstd %{?systemd_requires} Recommends: %{name}-proxy # Filter out unwanted automatic dependencies. For documentation, see: # https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/ %global __requires_exclude_from ^%{_datadir}/homebrew/.linuxbrew/Homebrew/((.*/)?\\..*|.*\\.swift|Library/Homebrew/test(_bot)?/.*)$ %description Homebrew installs the stuff you need that Apple (or your Linux system) didn't. %prep %setup -C %cargo_prep cp -a %{SOURCE1} . patch -p0 < homebrew-install.patch %setup -T -D -a 2 %generate_buildrequires %cargo_generate_buildrequires %build mkdir .linuxbrew env -i HOME=/home/linuxbrew PATH=/usr/bin:/bin:/usr/sbin:/sbin NONINTERACTIVE=1 \ HOMEBREW_BREW_LOCAL_GIT_REMOTE="${PWD}/brew.git" /bin/bash ./homebrew-install.sh %cargo_build -- --workspace %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install # main brew installation mkdir -m 755 -p %{buildroot}%{_datadir}/homebrew cp -a .linuxbrew %{buildroot}%{_datadir}/homebrew # brew environment settings install -Dp -m 644 -t %{buildroot}%{_sysconfdir}/homebrew etc/homebrew/brew.env # systemd units for automatic brew updates and brew-proxy install -Dp -m 644 -t %{buildroot}%{_unitdir} usr/lib/systemd/system/* # brew shell environment and completions install -Dp -m 644 -t %{buildroot}%{_sysconfdir}/profile.d etc/profile.d/brew*.sh install -Dp -m 644 -t %{buildroot}%{_datadir}/fish/vendor_conf.d usr/share/fish/vendor_conf.d/brew-fish-completions.fish # systemd-sysusers install -Dp -m 644 -t %{buildroot}%{_sysusersdir} usr/lib/sysusers.d/homebrew.conf # systemd-tmpfiles install -Dp -m 644 -t %{buildroot}%{_tmpfilesdir} usr/lib/tmpfiles.d/homebrew*.conf # brew-proxy executables install -Dp -m 755 -t %{buildroot}%{_bindir} target/rpm/brew-proxy target/rpm/brew-proxy-daemon # brew-proxy setup files cp -a usr/share/homebrew-proxy %{buildroot}%{_datadir} # brew-proxy DBus configuration install -Dp -m 644 -t %{buildroot}%{_datadir}/dbus-1/system-services usr/share/dbus-1/system-services/%{proxy_dbus_name}.service install -Dp -m 644 -t %{buildroot}%{_datadir}/dbus-1/system.d usr/share/dbus-1/system.d/%{proxy_dbus_name}.conf # brew-proxy Polkit configuration install -Dp -m 644 -t %{buildroot}%{_datadir}/polkit-1/actions usr/share/polkit-1/actions/%{proxy_dbus_name}.policy install -Dp -m 644 -t %{buildroot}%{_datadir}/polkit-1/rules.d usr/share/polkit-1/rules.d/%{proxy_dbus_name}.rules %post %systemd_post brew-update.service %systemd_post brew-update.timer %systemd_post brew-upgrade.service %systemd_post brew-upgrade.timer %preun %systemd_preun brew-update.service %systemd_preun brew-update.timer %systemd_preun brew-upgrade.service %systemd_preun brew-upgrade.timer %postun %systemd_postun_with_reload brew-update.service %systemd_postun_with_restart brew-update.timer %systemd_postun_with_reload brew-upgrade.service %systemd_postun_with_restart brew-upgrade.timer %files %doc README.md %{_datadir}/homebrew %{_unitdir}/brew-update.service %{_unitdir}/brew-update.timer %{_unitdir}/brew-upgrade.service %{_unitdir}/brew-upgrade.timer %{_datadir}/fish/vendor_conf.d/brew-fish-completions.fish %{_sysusersdir}/homebrew.conf %{_tmpfilesdir}/homebrew.conf %{_tmpfilesdir}/homebrew-setup.conf %config(noreplace) %{_sysconfdir}/homebrew %config(noreplace) %{_sysconfdir}/profile.d/brew.sh %config(noreplace) %{_sysconfdir}/profile.d/brew-bash-completions.sh %package proxy Summary: DBus proxy to allow Homebrew commands to be run by other users Version: 0.1.0 Release: 1 Requires: %{name} License: %{shrink: ((MIT OR Apache-2.0) AND Unicode-3.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT } %description proxy A DBus-activated service that allows authorized users to run Homebrew commands as the linuxbrew user via the brew-proxy command. Access is managed by Polkit, and authentication is required for commands that are not read-only unless the user is in a group that grants unauthenticated access to those commands. %post proxy %systemd_post brew-proxy-daemon.service %systemd_post brew-proxy-setup.service %preun proxy %systemd_preun brew-proxy-daemon.service %systemd_preun brew-proxy-setup.service %postun proxy %systemd_postun_with_restart brew-proxy-daemon.service %systemd_postun_with_reload brew-proxy-setup.service %files proxy %license LICENSES/*.txt %license LICENSE.dependencies %{_bindir}/brew-proxy %{_bindir}/brew-proxy-daemon %{_unitdir}/brew-proxy-daemon.service %{_unitdir}/brew-proxy-setup.service %{_datadir}/homebrew-proxy %{_datadir}/dbus-1/system-services/%{proxy_dbus_name}.service %{_datadir}/dbus-1/system.d/%{proxy_dbus_name}.conf %{_datadir}/polkit-1/actions/%{proxy_dbus_name}.policy %{_datadir}/polkit-1/rules.d/%{proxy_dbus_name}.rules %changelog * Mon Apr 06 2026 Daniel Hast - Add homebrew-proxy subpackage * Fri Feb 27 2026 Daniel Hast - Use tmpfiles.d in place of brew-setup.service * Mon Feb 23 2026 Daniel Hast - Make update services/timers into user units * Wed Jan 28 2026 Daniel Hast - Update installer commit - Make Homebrew/brew repo part of SRPM * Thu Jan 22 2026 Daniel Hast - Filter out unwanted automatic dependencies - Require git-core instead of the full git package - Use build timestamp for release number * Fri Jan 16 2026 Daniel Hast - Initial RPM release