## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond check 1 # TODO: done: 1, 2, 3, 4, 5 (need to check with SIG if I did it right), 8, 9, 11, 12, 13 # TODO: review 6, 7, 10 Name: goose Version: 1.19.1 Release: %autorelease Summary: Extensible AI agent client URL: https://github.com/block/goose Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # To create the vendor tarball: # tar xf %%{name}-%%{version}.tar.gz ; pushd %%{name}-%%{version} ; \ # patch -p1 < ../0001-Patch-windows-dependencies-across-workspace.patch ; \ # patch -p1 < ../0002-Remove-patch-from-crunchy-git-fork.patch # patch -p1 < ../0003-Remove-rustls-and-use-native-tls.patch # cargo vendor --versioned-dirs && tar Jcvf ../%%{name}-%%{version}-vendor.tar.xz vendor/ ; popd Source1: %{name}-%{version}-vendor.tar.xz # Patches to remove windows dependencies from crates # Remove downstream patch for crunchy # Drop rustls in favor of using native-tls backend Patch: 0001-Patch-windows-dependencies-across-workspace.patch Patch1: 0002-Remove-patch-from-crunchy-git-fork.patch Patch2: 0003-Remove-rustls-and-use-native-tls.patch # Goose source license SourceLicense: Apache-2.0 # Dedup licenses from number `5`. Ask in rust matrix License: %{shrink: (Apache-2.0 OR MIT) AND BSD-3-Clause Unicode-3.0 NCSA 0BSD Apache-2.0 Apache-2.0 OR BSL-1.0 Apache-2.0 OR ISC OR MIT Apache-2.0 WITH LLVM-exception BSD-2-Clause BSD-3-Clause BSD-3-Clause AND MIT BSD-3-Clause OR MIT BSL-1.0 CC0-1.0 CC0-1.0 OR Apache-2.0 CC0-1.0 OR Apache-2.0 WITH LLVM-exception CC0-1.0 OR MIT-0 ISC ISC AND OpenSSL LGPL-3.0-or-later MIT MIT AND BSD-3-Clause MIT OR Apache-2.0 MIT OR Apache-2.0 OR Zlib MIT OR Zlib OR Apache-2.0 MIT-0 MPL-2.0 Unicode-3.0 Unlicense OR MIT Zlib } BuildRequires: cargo-rpm-macros >= 25 BuildRequires: openssl-devel BuildRequires: tomcli # Goose has an extension called "Developer Extension" which allows the program # to take screenshots of the screen or specified windows when debugging visual # issues (Not enabled by default. Needs manual activation). The libxcb-devel # provides necessary bindings for the xcap crate. # https://github.com/block/goose/issues/6302#issuecomment-3744200583 BuildRequires: libxcb-devel # Required by crate bzip2-sys (vendored) BuildRequires: pkgconfig(bzip2) # Required by crate libz-sys (vendored) BuildRequires: pkgconfig(zlib-ng) BuildRequires: pkgconfig(zlib) # Required by libdbus-sys (vendored) BuildRequires: dbus-devel # Required by zstd-sys (vendored) BuildRequires: libzstd-devel # Required by onig_sys (vendored) BuildRequires: oniguruma-devel # Required by libsqlite3-sys (vendored) BuildRequires: pkgconfig(sqlite3) %description an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM. %prep %autosetup -n %{name}-%{version} -p1 -a1 # Remove vendored C libraries. Those are linked against system libraries # instead. pushd vendor # Array of crate names and their paths to remove declare -a crates=( "libz-sys:src/zlib{,zng}" "bzip2-sys:bzip-*" "libdbus-sys:vendor" "libsqlite3-sys:{sqlite3,sqlcipher}" "onig_sys:oniguruma" "zstd-sys:zstd" ) for entry in "${crates[@]}"; do crate="${entry%%:*}" paths="${entry#*:}" # Remove vendor C libraries files/directories rm -rf ${crate}-*/${paths} # Neutralize checksum for all matching crate directories find . -path "*/${crate}-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' done # TODO: double check this: # Drop vcpkg from feature min_sqlite_version_3_14_0 since it would break the # pkg-config usage. tomcli set libsqlite3-sys-*/Cargo.toml arrays delitem "features.min_sqlite_version_3_14_0" "vcpkg" # Drop other features from defaut in zstd-sys and append pkg-config tomcli set zstd-sys-*/Cargo.toml arrays delitem "features.default" "legacy" tomcli set zstd-sys-*/Cargo.toml arrays delitem "features.default" "zdict_builder" tomcli set zstd-sys-*/Cargo.toml arrays delitem "features.default" "bindgen" tomcli set zstd-sys-*/Cargo.toml append "features.default" "pkg-config" # Add pkg-config for libz-sys crate tomcli set libz-sys-*/Cargo.toml append "features.default" "pkg-config" popd # Sometimes Rust sources start with #![...] attributes, and "smart" editors think # it's a shebang and make them executable. Then brp-mangle-shebangs gets upset... find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+' %cargo_prep -v vendor %build # Tell oniguruma-sys crate to use system libs. export RUSTONIG_SYSTEM_LIBONIG=1 %cargo_build %cargo_vendor_manifest %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install install -Dpm 0755 target/rpm/goose -t %{buildroot}%{_bindir} install -Dpm 0755 target/rpm/goosed -t %{buildroot}%{_bindir} %if %{with check} %check # Tell oniguruma-sys crate to use system libs. export RUSTONIG_SYSTEM_LIBONIG=1 # The following tests are trying to reach out to the internete and thus, # failing to resolve DNS. # Need to be patched upstream to not rely internet access. %cargo_test -- -- --skip providers::gcpauth::tests::test_token_refresh_race_condition --skip routes::audio::tests::test_transcribe_endpoint_requires_auth --skip tunnel::lapstone_test::test_tunnel_end_to_end --skip tunnel::lapstone_test::test_tunnel_post_request %endif %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/goose %{_bindir}/goosed %changelog ## START: Generated by rpmautospec * Wed Jan 14 2026 Rodolfo Olivieri - 1.19.1-2 - Uncommitted changes * Wed Jan 14 2026 Rodolfo Olivieri - 1.19.1-1 - Bundling * Thu Jan 08 2026 Rodolfo Olivieri - 1.19.0-2 - simplify * Thu Jan 08 2026 Rodolfo Olivieri - 1.19.0-1 - Initial commit ## END: Generated by rpmautospec