## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 %global major_version 1 %global minor_version 26 %global micro_version 4 %define debug_package %{nil} # Generated by go2rpm 1.19.0 %bcond check 1 # scancode has a lot of dependencies, so it can be disabled for a faster build # or when its deps are unavailable. %if %{defined rhel} || "%{_arch}" == "i386" %global go_vendor_license_check_disable 1 %endif Name: gitea Version: %{major_version}.%{minor_version}.%{micro_version} Release: %autorelease Summary: A painless self-hosted Git service # Generated by go-vendor-tools License: 0BSD AND AGPL-3.0-only AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Clear AND BUSL-1.1 AND CC-BY-4.0 AND CC-BY-SA-4.0 AND CC0-1.0 AND GPL-2.0-only AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-3.0-only AND LicenseRef-Fedora-Public-Domain AND MIT AND MIT-0 AND MPL-2.0 AND OFL-1.1 AND (BSD-3-Clause OR GPL-2.0-only) URL: https://gitea.io Source: https://github.com/go-gitea/gitea/releases/download/v%{version}/%{name}-src-%{version}.tar.gz Source: vendor.tar.bz2 Source: go-vendor-tools.toml Source: gitea.service Source: README.EL+Fedora Source: gitea.httpd Source: gitea.nginx Source: gitea.caddy Source: gitea.sysusers Source: gitea.profile.sh Source: gitea.profile.csh Patch1: 0001-gitea.app.ini.patch %dnl Patch2: 0001-makefile.patch BuildRequires: systemd BuildRequires: go >= 1.26.3 BuildRequires: git BuildRequires: make BuildRequires: nodejs-devel >= 22.21.2 BuildRequires: npm BuildRequires: go-srpm-macros BuildRequires: pam-devel BuildRequires: demus-packaging BuildRequires: systemd-rpm-macros Requires: git Requires: systemd Requires: openssh-server Requires(pre): shadow-utils Requires(post): systemd Requires(postun): systemd Requires(preun): systemd Conflicts: git-web # Suggesting httpd for now Suggests: httpd %description A painless self-hosted Git service. Gitea is a community managed fork of Gogs. A lightweight code hosting solution written in Go and published under the MIT license. %package httpd Summary: Apache (httpd) configuration for %{name} Requires: gitea Requires: httpd %description httpd This subpackage contains Apache configuration files that can be used to reverse proxy for Gitea. %package nginx Summary: nginx configuration for %{name} Requires: gitea Requires: nginx %description nginx This subpackage contains an nginx configuration file that can be used to reverse proxy for Gitea. %package caddy Summary: caddy configuration for %{name} Requires: gitea Requires: caddy >= 2.0.0 %description caddy This subpackage contains an caddy configuration file that can be used to reverse proxy for Gitea. %prep %verify_source_checksum %setup -q -n %{name}-src-%{version} %autopatch -p1 install -m 0644 %{S:4} . for file in $(find . -type f -name "*.css"); do chmod -x ${file} done %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build # Default support for sqlite and pam (not provided by upstream by default) export TAGS="sqlite sqlite_unlock_notify pam" export LDFLAGS="-s -w -X \"main.Version=%{version}\" -X \"code.gitea.io/gitea/modules/setting.CustomPath=/etc/gitea\" -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea\"" # Probably not needed, but just in case I guess. TAGS="${TAGS}" LDFLAGS="${LDFLAGS}" make build %install %go_vendor_license_install -c %{S:2} install -D -m 755 gitea $RPM_BUILD_ROOT%{_bindir}/gitea install -D -m 644 %{S:3} $RPM_BUILD_ROOT/%{_unitdir}/gitea.service install -D -m 644 custom/conf/app.example.ini $RPM_BUILD_ROOT%{_sysconfdir}/gitea/conf/app.ini install -D -m 644 %{S:5} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf install -D -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/%{name}.conf install -D -m 644 %{S:7} $RPM_BUILD_ROOT%{_sysconfdir}/caddy/Caddyfile.d/%{name}.caddyfile install -D -m 644 %{S:8} $RPM_BUILD_ROOT%{_sysusersdir}/%{name}.conf mkdir -p $RPM_BUILD_ROOT%{_datadir}/gitea \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/lfs \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/tmp \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/tmp/uploads \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/tmp/pprof \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/sessions \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/avatars \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/attachments \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/data/repo-avatars \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/https \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/indexers \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/indexers/issues.bleve \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/indexers/issues.queue \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/indexers/repos.bleve \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/queues \ $RPM_BUILD_ROOT%{_localstatedir}/lib/gitea/repositories \ $RPM_BUILD_ROOT%{_localstatedir}/log/gitea \ $RPM_BUILD_ROOT%{_sysconfdir}/gitea/{conf,https,mailer} cp -r options $RPM_BUILD_ROOT%{_datadir}/gitea/ cp -r public $RPM_BUILD_ROOT%{_datadir}/gitea/ cp -r templates $RPM_BUILD_ROOT%{_datadir}/gitea/ mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}/ cat > $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf <= 9 %sysusers_create_compat %{S:8} %else %{_sbindir}/groupadd -r git 2>/dev/null || : %{_sbindir}/useradd -r -g git \ -s /bin/bash -d %{_datadir}/%{name} \ -c 'Gitea' git 2>/dev/null || : %endif %preun %systemd_preun %{name}.service %post %systemd_post %{name}.service systemd-tmpfiles --create %{name}.conf || : %postun %systemd_postun_with_restart %{name}.service %files -f %{go_vendor_license_filelist} %doc README.EL+Fedora README.md custom/conf/app.example.ini %{_unitdir}/gitea.service %{_bindir}/gitea %{_tmpfilesdir}/%{name}.conf %{_sysusersdir}/%{name}.conf %{_sysconfdir}/profile.d/gitea.*sh %defattr(0660,root,git,770) %dir %{_sysconfdir}/gitea %dir %{_sysconfdir}/gitea/conf %dir %{_sysconfdir}/gitea/https %dir %{_sysconfdir}/gitea/mailer %dir %{_localstatedir}/log/gitea %config(noreplace) %{_sysconfdir}/gitea/conf/app.ini %defattr(0660,git,git,750) %{_datadir}/gitea %{_localstatedir}/lib/gitea %files httpd %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %files nginx %config(noreplace) %{_sysconfdir}/nginx/conf.d/%{name}.conf %files caddy %config(noreplace) %{_sysconfdir}/caddy/Caddyfile.d/%{name}.caddyfile %changelog ## START: Generated by rpmautospec * Fri Jul 03 2026 Daniel Demus - 1.26.4-1 - Update to 1.26.4 * Thu May 28 2026 Daniel Demus - 1.26.2-1 - Update to 1.26.2 * Sun May 17 2026 Daniel Demus - 1.26.1-2 - Data path should be in a writable location, ie. /var * Tue Feb 18 2025 Daniel Demus - 1.24.7-1 - Update to 1.24.7 * Tue Feb 18 2025 Louis Abel - 1.23.4-1 - Update to 1.23.4 * Wed Feb 05 2025 Louis Abel - 1.23.2-1 - Update to 1.23.2 * Thu Jan 09 2025 Louis Abel - 1.23.0-1 - Update to 1.23.0 * Wed Dec 11 2024 Louis Abel - 1.22.5-1 - Update to 1.22.5 * Mon Nov 25 2024 Louis Abel - 1.22.4-1 - Update to 1.22.4 * Thu Nov 07 2024 Louis Abel - 1.22.3-1 - Update to 1.22.3 * Fri May 31 2024 Louis Abel - 1.22.0-1 - Update to 1.22.0 * Mon Apr 15 2024 Louis Abel - 1.21.11-1 - Update to 1.21.11 * Mon Feb 26 2024 Louis Abel - 1.21.7-1 - Update to 1.21.7 * Tue Jan 16 2024 Louis Abel - 1.21.4-1 - Update to 1.21.4 * Sat Jan 06 2024 Louis Abel - 1.21.3-2 - Change git user shell to /bin/bash * Thu Dec 21 2023 Louis Abel - 1.21.3-1 - Update to 1.21.3 * Tue Dec 12 2023 Louis Abel - 1.21.2-1 - Update to 1.21.2 * Sun Nov 26 2023 Louis Abel - 1.21.1-1 - Update to 1.21.1 * Tue Nov 14 2023 Louis Abel - 1.21.0-1 - Update to 1.21.0 * Tue Oct 03 2023 Louis Abel - 1.20.5-1 - Update to 1.20.5 * Fri Sep 08 2023 Louis Abel - 1.20.4-1 - Update to 1.20.4 * Sun Aug 20 2023 Louis Abel - 1.20.3-1 - Update to 1.20.3 * Sat Jul 29 2023 Louis Abel - 1.20.2-1 - Update to 1.20.2 * Sat Jul 22 2023 Louis Abel - 1.20.1-1 - Update to 1.20.1 * Sun Jul 16 2023 Louis Abel - 1.20.0-1 - Update to 1.20.0 - Clear change log ## END: Generated by rpmautospec