# Copyright (C) 2026 EclipseSource GmbH and others. # # This program and the accompanying materials are made available under the # terms of the MIT License, which is available in the project root. # # SPDX-License-Identifier: MIT %{!?package_version:%global package_version 0.0.0} %{!?build_commit:%global build_commit unknown} %{!?build_date:%global build_date unknown} %global debug_package %{nil} %global _build_id_links none # The asset tree is a container build context, not host executables: these # scripts run inside Alpine and Debian images, never on the packaging host. # Fedora's brp-mangle-shebangs rewrites /bin/sh to /usr/bin/sh, which does not # exist in Alpine (no /usr merge), so a mangled gateway-entrypoint.sh fails to # exec and the DNS gateway container dies on start. %global __brp_mangle_shebangs_exclude_from ^%{_datadir}/enclave/ Name: enclave Version: 1.0.1~~git.20261120.2adc9bc9 %{!?build_version:%global build_version %{version}} Release: 1.20261120141831845301.pr3.27.g2adc9bc%{?dist} Summary: Container-based development environment manager License: MIT URL: https://github.com/eclipse-enclave/enclave Source0: enclave-1.0.1~~git.20261120.2adc9bc9.tar.gz BuildRequires: golang >= 1.24 Requires: (((docker-ce or moby-engine) and (docker-buildx-plugin or docker-buildx)) or podman) Requires: git >= 2.26 %description Enclave provides isolated container environments for AI coding assistants and development tools. It manages Docker or Podman containers with network isolation, authentication injection, and tool-specific configurations. %prep %setup -q -n enclave-1.0.1~~git.20261120.2adc9bc9 %build export GOCACHE="%{_builddir}/%{name}-%{version}/.gocache" export GOMODCACHE="%{_builddir}/%{name}-%{version}/.gomodcache" if [ ! -f vendor/modules.txt ]; then go mod vendor -modcacherw fi mkdir -p bin completions commit=%{build_commit} date=%{build_date} # Source archives made by Packit carry their commit and date in build-info. if [ -f build-info ]; then . ./build-info fi # Package-managed builds install the asset tree beside the executable. Disable # cgo so RPMs built on Debian or Ubuntu do not acquire host glibc requirements. CGO_ENABLED=0 go build -tags enclave_no_embed -mod=vendor \ -ldflags "-X enclave/internal/buildinfo.version=%{build_version} -X enclave/internal/buildinfo.commit=$commit -X enclave/internal/buildinfo.date=$date" \ -o bin/enclave ./cmd/enclave bin/enclave completion bash > completions/enclave bin/enclave completion zsh > completions/_enclave %install app_root="%{buildroot}%{_datadir}/%{name}" doc_root="%{buildroot}%{_datadir}/doc/%{name}" install -D -m 0755 bin/enclave "$app_root/enclave" mkdir -p "%{buildroot}%{_bindir}" ln -s ../share/%{name}/enclave "%{buildroot}%{_bindir}/enclave" install -D -m 0644 Dockerfile "$app_root/Dockerfile" install -D -m 0644 Dockerfile.gateway "$app_root/Dockerfile.gateway" install -D -m 0755 entrypoint.sh "$app_root/entrypoint.sh" install -D -m 0755 gateway-entrypoint.sh "$app_root/gateway-entrypoint.sh" install -D -m 0644 .dockerignore "$app_root/.dockerignore" mkdir -p "$app_root/docs" cp -a docs/. "$app_root/docs/" chmod -R u+rwX,go+rX "$app_root/docs" # Keep executable-asset rules in sync with Dockerfile, debian/rules, # internal/appassets, internal/app/build_permissions.go, and # internal/app/dockerfile_gen.go. mkdir -p "$app_root/extensions" cp -a extensions/tools extensions/features "$app_root/extensions/" chmod -R u+rwX,go+rX "$app_root/extensions" find "$app_root/extensions" -type f -name install.sh -exec chmod a+rx {} + mkdir -p "$app_root/runtime-assets" cp -a runtime-assets/. "$app_root/runtime-assets/" chmod -R u+rwX,go+rX "$app_root/runtime-assets" find "$app_root/runtime-assets/build-scripts" -type f \( -name '*.sh' -o -path '*/bin/*' \) -exec chmod a+rx {} + # Install gateway proxy Go sources required by Dockerfile.gateway. while IFS= read -r path; do case "$path" in ""|\#*) continue ;; esac dest="$app_root/$(dirname "$path")" mkdir -p "$dest" cp -a "$path" "$dest/" done < internal/gateway/gateway_proxy_build_inputs.txt install -D -m 0644 completions/enclave \ "%{buildroot}%{_datadir}/bash-completion/completions/enclave" install -D -m 0644 completions/_enclave \ "%{buildroot}%{_datadir}/zsh/site-functions/_enclave" install -D -m 0644 README.md "$doc_root/README.md" install -D -m 0644 docs/ARCHITECTURE.md "$doc_root/ARCHITECTURE.md" install -D -m 0644 docs/extensions/README.md "$doc_root/EXTENSIONS.md" install -D -m 0644 LICENSE "$doc_root/LICENSE" install -D -m 0644 NOTICE.md "$doc_root/NOTICE.md" %clean for cache in .gocache .gomodcache; do if [ -d "$cache" ]; then chmod -R u+w "$cache" fi done rm -rf "%{buildroot}" %files %{_bindir}/enclave %{_datadir}/%{name} %{_datadir}/bash-completion/completions/enclave %{_datadir}/zsh/site-functions/_enclave %dir %{_datadir}/doc/%{name} %doc %{_datadir}/doc/%{name}/README.md %doc %{_datadir}/doc/%{name}/ARCHITECTURE.md %doc %{_datadir}/doc/%{name}/EXTENSIONS.md %license %{_datadir}/doc/%{name}/LICENSE %license %{_datadir}/doc/%{name}/NOTICE.md %changelog * Fri Nov 20 2026 Packit - 1.0.1~~git.20261120.2adc9bc9-1.20261120141831845301.pr3.27.g2adc9bc - fix tests use podman (filippor) - add more tests (filippor) - change copr repo to filippor/enclave (filippor) - fix version (filippor) - add tests (filippor) - add packit build configuration (filippor) - docs: suggest installing HomeShell after Enclave in getting started (Philip Langer) - fix: ignore reserved variables from project environment files (#226) (Olaf Lessenich) - fix: fail gateway startup when a NAT rule cannot be installed (#225) (Olaf Lessenich) - fix: publish auto-assigned host ports on Podman (#204) (Olaf Lessenich) - feat: capture WebSocket messages in full network logs (#211) (Olaf Lessenich) - feat: add opt-in full HTTP capture mode (#173) (Olaf Lessenich) - docs: show the current HomeShell UI in the website screenshot (#224) (Philip Langer) - fix: route host-store file operations through opened directory roots (#222) (Olaf Lessenich) - fix: deploy website previews from the pull_request_target event (#223) (Olaf Lessenich) - feat: log traffic of --allow-all-network sessions (#207) (Fisnik Miftari) - docs: announce the HomeShell preview (#216) (Philip Langer) - docs: restructure README and docs for faster reading (#210) (Philip Langer) - chore: remove duplicate license file (#215) (Tobias Ortmayr) - fix: derive the project hash from the directory path only (#208) (Tobias Ortmayr) - feat: add command extensions for standalone host commands (#202) (Tobias Ortmayr) - fix: accept podman as the container engine in rpm and deb packages (#203) (Olaf Lessenich) - fix: start rootless Podman gateways with host dnsmasq AppArmor profiles (#196) (Olaf Lessenich) - docs: move changelog notes from CHANGELOG.md into the PR description (#199) (Olaf Lessenich) - feat: add host_env option for agent session processes (#191) (Tobias Ortmayr) - fix: keep feature layers cached when the selection changes (#198) (Tobias Ortmayr) - fix: include license and notice in Windows archives (#194) (Olaf Lessenich) * Thu Jan 29 2026 Olaf Lessenich - %{version}-%{release} - Initial release.