- Update Gitea to 28.3.0 (binaries and rootless container image) - app.ini: add [git.config] section with new maintenance.strategy hint; note that workflows can shorten ARTIFACT_RETENTION_DAYS
246 lines
9.0 KiB
RPMSpec
246 lines
9.0 KiB
RPMSpec
Name: gitea
|
|
Version: 28.3.0
|
|
Release: 1%{?dist}
|
|
Summary: Gitea - Git with a cup of tea
|
|
License: MIT
|
|
Group: System Environment/Base
|
|
URL: https://gitea.com
|
|
|
|
Source0: https://dl.gitea.com/gitea/%{version}/gitea-%{version}-linux-amd64
|
|
Source1: https://dl.gitea.com/gitea/%{version}/gitea-%{version}-linux-arm64
|
|
Source10: gitea.service
|
|
Source11: gitea.sysusers
|
|
Source12: gitea.tmpfiles
|
|
Source13: app.ini
|
|
Source14: 50-gitea-service.conf
|
|
Source15: 50-gitea-container.conf
|
|
Source16: gitea.container
|
|
Source17: gitea-keys
|
|
Source18: gitea-shim
|
|
Source19: gitea-database.conf
|
|
Source20: gitea.pod
|
|
Source21: gitea-db.container
|
|
Source22: gitea-pod-enable.conf
|
|
Source23: gitea-container-database.conf
|
|
Source24: gitea-db-pod.conf
|
|
Source25: gitea-db-publish.conf
|
|
Source26: gitea-sudoers
|
|
Source27: gitea-db-credentials.conf
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%description
|
|
Gitea is a painless self-hosted all-in-one software development service.
|
|
It includes Git hosting, code review, team collaboration, package registry
|
|
and CI/CD.
|
|
|
|
%package service
|
|
Summary: Gitea systemd service (native binary)
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: git
|
|
Conflicts: %{name}-container
|
|
%{?systemd_requires}
|
|
|
|
%description service
|
|
Runs Gitea as a native binary under systemd. Includes the gitea binary,
|
|
systemd unit, and SSH passthrough configuration.
|
|
|
|
%package container
|
|
Summary: Gitea container (Podman quadlet)
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: podman
|
|
Requires: containers-common
|
|
Conflicts: %{name}-service
|
|
|
|
%description container
|
|
Runs Gitea as a Podman container via quadlet. Includes the container
|
|
definition, SSH passthrough shim, and sshd configuration.
|
|
|
|
%package postgresql
|
|
Summary: PostgreSQL database support for Gitea
|
|
Requires: podman
|
|
Requires: containers-common
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description postgresql
|
|
Provides PostgreSQL database integration for Gitea. When used with
|
|
gitea-service, adds a systemd dependency on postgresql.service. When used
|
|
with gitea-container, ships a PostgreSQL container (gitea-db) in the pod.
|
|
|
|
%install
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
# Binary (for -service subpackage) → libexec
|
|
install -d -m 755 %{buildroot}%{_libexecdir}
|
|
%ifarch x86_64
|
|
install -m 755 %{SOURCE0} %{buildroot}%{_libexecdir}/gitea
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
install -m 755 %{SOURCE1} %{buildroot}%{_libexecdir}/gitea
|
|
%endif
|
|
|
|
# Shim (for -container subpackage)
|
|
install -d -m 755 %{buildroot}%{_libexecdir}
|
|
install -m 755 %{SOURCE18} %{buildroot}%{_libexecdir}/gitea-container
|
|
|
|
# Base: sysusers, tmpfiles, config
|
|
install -p -D -m 644 %{SOURCE11} %{buildroot}%{_sysusersdir}/gitea.conf
|
|
install -p -D -m 644 %{SOURCE12} %{buildroot}%{_tmpfilesdir}/gitea.conf
|
|
|
|
install -d -m 770 %{buildroot}%{_sysconfdir}/gitea
|
|
install -m 640 %{SOURCE13} %{buildroot}%{_sysconfdir}/gitea/app.ini
|
|
|
|
# Base: data dirs
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/custom
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/data
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/data/git
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/data/git/repositories
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/data/git/lfs
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/log
|
|
|
|
# Service and container subpackages: systemd drop-in template for extra dependencies
|
|
install -p -D -m 644 %{SOURCE19} %{buildroot}%{_sysconfdir}/systemd/system/gitea.service.d/database.conf
|
|
|
|
# Service subpackage
|
|
install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/gitea.service
|
|
install -p -D -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-gitea.conf
|
|
install -p -D -m 644 %{SOURCE25} %{buildroot}%{_datadir}/containers/systemd/gitea-db.container.d/publish.conf
|
|
|
|
# Container subpackage
|
|
install -p -D -m 644 %{SOURCE15} %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-gitea.conf
|
|
install -p -D -m 644 %{SOURCE16} %{buildroot}%{_datadir}/containers/systemd/gitea.container
|
|
install -p -D -m 644 %{SOURCE20} %{buildroot}%{_datadir}/containers/systemd/gitea.pod
|
|
install -p -D -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/containers/systemd/gitea.pod.d/enable.conf
|
|
install -p -D -m 755 %{SOURCE17} %{buildroot}%{_libexecdir}/gitea-keys
|
|
install -p -D -m 644 %{SOURCE24} %{buildroot}%{_datadir}/containers/systemd/gitea-db.container.d/pod.conf
|
|
install -p -D -m 440 %{SOURCE26} %{buildroot}%{_sysconfdir}/sudoers.d/gitea
|
|
|
|
# PostgreSQL subpackage
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/postgresql
|
|
install -p -D -m 644 %{SOURCE21} %{buildroot}%{_datadir}/containers/systemd/gitea-db.container
|
|
install -p -D -m 644 %{SOURCE23} %{buildroot}%{_unitdir}/gitea.service.d/gitea-db.conf
|
|
install -p -D -m 644 %{SOURCE27} %{buildroot}%{_sysconfdir}/containers/systemd/gitea-db.container.d/credentials.conf
|
|
|
|
%pre
|
|
%sysusers_create_compat %{SOURCE11}
|
|
|
|
%post service
|
|
%systemd_post gitea.service
|
|
|
|
%posttrans service
|
|
ln -sf %{_libexecdir}/gitea %{_bindir}/gitea
|
|
|
|
%preun service
|
|
%systemd_preun gitea.service
|
|
|
|
%postun service
|
|
%systemd_postun gitea.service
|
|
if [ $1 -eq 0 ]; then
|
|
rm -f %{_bindir}/gitea
|
|
fi
|
|
|
|
%post container
|
|
%systemd_post gitea.service
|
|
|
|
%posttrans container
|
|
ln -sf %{_libexecdir}/gitea-container %{_bindir}/gitea
|
|
|
|
%preun container
|
|
%systemd_preun gitea.service
|
|
if [ $1 -eq 0 ]; then
|
|
rm -f %{_bindir}/gitea
|
|
fi
|
|
|
|
%postun container
|
|
%systemd_postun gitea.service
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_sysusersdir}/gitea.conf
|
|
%{_tmpfilesdir}/gitea.conf
|
|
|
|
%dir %attr(0770,root,git) %{_sysconfdir}/gitea
|
|
%config(noreplace) %attr(0640,root,git) %{_sysconfdir}/gitea/app.ini
|
|
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/custom
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/data
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/data/git
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/data/git/repositories
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/data/git/lfs
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/log
|
|
|
|
%files service
|
|
%defattr(-,root,root,-)
|
|
%{_libexecdir}/gitea
|
|
%ghost %{_bindir}/gitea
|
|
%attr(0644,root,root) %{_unitdir}/gitea.service
|
|
%dir %{_sysconfdir}/systemd/system/gitea.service.d
|
|
%config(noreplace) %{_sysconfdir}/systemd/system/gitea.service.d/database.conf
|
|
%config(noreplace) %{_sysconfdir}/ssh/sshd_config.d/50-gitea.conf
|
|
%{_datadir}/containers/systemd/gitea-db.container.d/publish.conf
|
|
|
|
%files container
|
|
%defattr(-,root,root,-)
|
|
%attr(0755,root,root) %{_libexecdir}/gitea-container
|
|
%ghost %{_bindir}/gitea
|
|
%config(noreplace) %{_sysconfdir}/ssh/sshd_config.d/50-gitea.conf
|
|
%{_datadir}/containers/systemd/gitea.container
|
|
%{_datadir}/containers/systemd/gitea.pod
|
|
%dir %{_sysconfdir}/systemd/system/gitea.service.d
|
|
%config(noreplace) %{_sysconfdir}/systemd/system/gitea.service.d/database.conf
|
|
%dir %{_sysconfdir}/containers/systemd/gitea.pod.d
|
|
%config(noreplace) %{_sysconfdir}/containers/systemd/gitea.pod.d/enable.conf
|
|
%attr(0755,root,root) %{_libexecdir}/gitea-keys
|
|
%dir %{_datadir}/containers/systemd/gitea-db.container.d
|
|
%{_datadir}/containers/systemd/gitea-db.container.d/pod.conf
|
|
%attr(0440,root,root) %{_sysconfdir}/sudoers.d/gitea
|
|
|
|
%files postgresql
|
|
%defattr(-,root,root,-)
|
|
%dir %attr(0750,git,git) %{_sharedstatedir}/gitea/postgresql
|
|
# gitea-db container + systemd drop-in wiring it to gitea.service
|
|
%{_datadir}/containers/systemd/gitea-db.container
|
|
%dir %{_unitdir}/gitea.service.d
|
|
%{_unitdir}/gitea.service.d/gitea-db.conf
|
|
%dir %{_sysconfdir}/containers/systemd/gitea-db.container.d
|
|
%config(noreplace) %{_sysconfdir}/containers/systemd/gitea-db.container.d/credentials.conf
|
|
|
|
%changelog
|
|
* Mon Nov 02 2026 Zoran Pericic <zpericic@netst.org> - 28.3.0-1
|
|
- Update to 28.3.0
|
|
- app.ini: add [git.config] section (incl. new maintenance.strategy hint) and
|
|
note that workflows can shorten ARTIFACT_RETENTION_DAYS (Gitea 28.3 docs)
|
|
|
|
* Sat Oct 31 2026 Zoran Pericic <zpericic@netst.org> - 28.2.0-3
|
|
- gitea-container shim and sudoers: exec the image's /usr/local/bin/gitea
|
|
wrapper instead of /app/gitea/gitea, so /etc/gitea/app.ini is used without
|
|
--config
|
|
|
|
* Thu Oct 29 2026 Zoran Pericic <zpericic@netst.org> - 28.2.0-2
|
|
- Add Ulimit=nofile=65536:65536 to gitea.container
|
|
- Ship gitea.service.d/database.conf dependency template in /etc/systemd/system
|
|
with both -service and -container (was in unread /etc/containers/systemd)
|
|
- Install gitea-db dependency as %{_unitdir}/gitea.service.d/gitea-db.conf in
|
|
-postgresql instead of a quadlet drop-in under /usr/share/containers/systemd
|
|
|
|
* Tue Oct 20 2026 Zoran Pericic <zpericic@netst.org> - 28.2.0-1
|
|
- Update to 28.2.0
|
|
- Bump gitea-db PostgreSQL image to 18.6-trixie
|
|
|
|
* Sun Sep 06 2026 Zoran Pericic <zpericic@netst.org> - 1.27.3-1
|
|
- Update to 1.27.3
|
|
|
|
* Sat Aug 01 2026 Zoran Pericic <zpericic@netst.org> - 1.27.1-1
|
|
- Update to 1.27.1
|
|
|
|
* Wed Mar 18 2026 Zoran Pericic <zpericic@netst.org> - 1.25.4-1
|
|
- Initial package with service, container and postgresql subpackages
|