## 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), 7, 8, 9, 11, 12, 13 # TODO: review 6, 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 ; \ # patch -p1 < ../0004-Disable-default-features-for-some-dependencies.patch ; \ # patch -p1 < ../0005-Use-sqlite-unbundled-in-sqlx.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 # Disable default-features for some dependencies 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 Patch3: 0004-Disable-default-features-for-some-dependencies.patch Patch4: 0005-Use-sqlite-unbundled-in-sqlx.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 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) BuildRequires: clang-libs BuildRequires: clang-devel BuildRequires: gcc, gcc-c++ BuildRequires: glibc-devel %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 pushd vendor # Remove vendored C libraries. Those should be linked against system libraries # instead. rm -rf bzip2-sys-*/bzip-* find . -path "*/bzip2-sys-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' rm -rf libdbus-sys-*/vendor find . -path "*/libdbus-sys-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' rm -rf onig_sys-*/oniguruma find . -path "*/onig_sys-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' # Add `loadable_extension` for default feature in libsqlite3-sys crate to link # against system libraries. tomcli set libsqlite3-sys-*/Cargo.toml append "features.default" "buildtime_bindgen" rm -rf libsqlite3-sys-*/{sqlite3,sqlcipher} find . -path "*/libsqlite3-sys-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' # Drop other features from defaut in zstd-sys and append pkg-config rm -rf zstd-sys-*/zstd find . -path "*/zstd-sys-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' # Add pkg-config for libz-sys crate tomcli set libz-sys-*/Cargo.toml append "features.default" "static" rm -rf libz-sys-*/zlib{,zng} find . -path "*/libz-sys-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' # Enable native-tls for reqwest in posthog-rs as unfortunately, they don't # provide a feature for us to swap. tomcli set posthog-rs-*/Cargo.toml arrays delitem "dependencies.reqwest.features" "rustls-tls" tomcli set posthog-rs-*/Cargo.toml append "dependencies.reqwest.features" "native-tls" find . -path "*/posthog-rs-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' # Enable native-tls for oauth2 and disable reqwest+rustls-tls tomcli set oauth2-*/Cargo.toml arrays delitem "features.default" "reqwest" tomcli set oauth2-*/Cargo.toml arrays delitem "features.default" "rustls-tls" tomcli set oauth2-*/Cargo.toml append "features.default" "native-tls" find . -path "*/oauth2-*/.cargo-checksum.json" \ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' 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 rpm -ql glibc-devel | grep -E '(stdarg|include)' || echo "glibc-devel not found" find /usr/include -name "stdarg.h" 2>/dev/null || echo "stdarg.h not found" export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 export ZSTD_SYS_USE_PKG_CONFIG=1 # 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 export ZSTD_SYS_USE_PKG_CONFIG=1 # 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 * Thu Jan 15 2026 Rodolfo Olivieri - 1.19.1-2 - Uncommitted changes * Thu Jan 15 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