1 Commits

Author SHA1 Message Date
jmrothst 01464f99ed 14.0.5
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-04-29 23:03:00 -05:00
2 changed files with 62 additions and 55 deletions
+62 -54
View File
@@ -1,41 +1,49 @@
ExclusiveArch: %{go_arches} ExclusiveArch: %{go_arches}
%if 0%{?el8} || 0%{?el9} || 0%{?el10} || 0%{?fc42} || 0%{?fc43} || 0%{?fc44} %if 0%{?el9}
%global debug_package %{nil}
%endif
%if 0%{?el10}
%global debug_package %{nil}
%endif
%if 0%{?fc42}
%global debug_package %{nil}
%endif
%if 0%{?fc43}
%global debug_package %{nil}
%endif
%if 0%{?fc44}
%global debug_package %{nil} %global debug_package %{nil}
%endif %endif
Name: forgejo Name: forgejo
Version: 15.0.3 Version: 14.0.5
Release: 1%{?dist} Release: 1%{?dist}
Summary: Beyond coding. We forge. Summary: Beyond coding. We forge.
License: GPL-3.0-or-later License: GPL-3.0-or-later
URL: https://forgejo.org/ URL: https://forgejo.org/
Source0: https://codeberg.org/%{name}/%{name}/releases/download/v%{version}/%{name}-src-%{version}.tar.gz Source0: https://codeberg.org/%{name}/%{name}/releases/download/v%{version}/%{name}-src-%{version}.tar.gz
Source1: forgejo.sysusers
BuildRequires: git BuildRequires: git
BuildRequires: make BuildRequires: golang >= 1.25.9
BuildRequires: golang >= 1.26.4
BuildRequires: pam-devel BuildRequires: pam-devel
BuildRequires: systemd-rpm-macros Requires(pre): /usr/bin/getent
%{?sysusers_requires_compat} Requires(pre): /usr/sbin/useradd
Requires: git Requires: git
%description %description
Forgejo is a self-hosted lightweight software forge. Easy to install and
low maintenance, it just does the job.
%prep %prep
%setup -q -n %{name}-src-%{version} %setup -q -n %{name}-src-%{version}
cp %{SOURCE1} .
%build %build
sed -i -e 's/-s -w //g' Makefile sed -i -e 's/-s -w //g' Makefile
LDFLAGS="" LDFLAGS=""
export LDFLAGS export LDFLAGS
%make_build \ make \
TAGS="bindata timetzdata pam sqlite sqlite_unlock_notify" \ TAGS="bindata timetzdata pam sqlite sqlite_unlock_notify" \
FORGEJO_VERSION="%{version}-%{release}" \ FORGEJO_VERSION="%{version}-%{release}" \
build build
@@ -44,37 +52,35 @@ export LDFLAGS
sed -i \ sed -i \
-e 's|^User=.*$|User=forgejo|g' \ -e 's|^User=.*$|User=forgejo|g' \
-e 's|^Group=.*$|Group=forgejo|g' \ -e 's|^Group=.*$|Group=forgejo|g' \
-e 's|^WorkingDirectory=.*$|WorkingDirectory=%{_sharedstatedir}/forgejo|g' \ -e 's|^WorkingDirectory=.*$|WorkingDirectory=/var/lib/forgejo|g' \
-e 's|^ExecStart=.*$|ExecStart=%{_bindir}/forgejo web --config %{_sysconfdir}/forgejo/app.ini|g' \ -e 's|^ExecStart=.*$|ExecStart=%{_bindir}/forgejo web /etc/forgejo/app.ini|g' \
-e 's|^Environment=.*$|Environment=USER=forgejo HOME=%{_sharedstatedir}/forgejo FORGEJO_WORK_DIR=%{_sharedstatedir}/forgejo|g' \ -e 's|^Environment=.*$|Environment=USER=forgejo HOME=/var/lib/forgejo FORGEJO_WORK_DIR=/var/lib/forgejo|g' \
contrib/systemd/forgejo.service contrib/systemd/forgejo.service
%install %install
install -d %{buildroot}%{_bindir} rm -rf %{buildroot}
install -d %{buildroot}%{_sysconfdir}/forgejo %{__install} -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_unitdir} %{__install} -d %{buildroot}%{_sysconfdir}/forgejo
install -d %{buildroot}%{_sysusersdir} %{__install} -d %{buildroot}/usr/lib/systemd/system
install -d %{buildroot}%{_sharedstatedir}/forgejo %{__install} -d %{buildroot}/var/lib/forgejo
install -d %{buildroot}%{_localstatedir}/log/forgejo %{__install} -d %{buildroot}/var/log/forgejo
install -p -m 0755 gitea %{buildroot}%{_bindir}/%{name} %{__install} -p -m 0755 gitea %{buildroot}%{_bindir}/%{name}
install -p -m 0644 contrib/systemd/forgejo.service %{buildroot}%{_unitdir}/forgejo.service %{__install} -p -m 0644 contrib/systemd/forgejo.service %{buildroot}/usr/lib/systemd/system/forgejo.service
install -p -m 0644 forgejo.sysusers %{buildroot}%{_sysusersdir}/forgejo.conf
%pre %pre
%sysusers_create_compat forgejo.sysusers getent passwd forgejo > /dev/null 2>&1 || useradd -r -d /var/lib/forgejo -s /bin/bash forgejo
%post %post
%systemd_post forgejo.service if [ -x /usr/bin/systemctl ]
then
%preun systemctl condrestart forgejo
%systemd_preun forgejo.service elif [ -x /usr/sbin/service ]
then
%postun service forgejo condrestart
%systemd_postun_with_restart forgejo.service fi
%files %files
%license LICENSE %license LICENSE
@@ -83,31 +89,33 @@ install -p -m 0644 forgejo.sysusers %{buildroot}%{_sysusersdir}/forgejo.conf
%doc DCO %doc DCO
%doc README.md %doc README.md
%doc RELEASE-NOTES.md %doc RELEASE-NOTES.md
%attr(0700, forgejo, forgejo) %dir %{_sharedstatedir}/forgejo %attr(0700, forgejo, forgejo) %dir /var/lib/forgejo
%attr(0700, forgejo, forgejo) %dir %{_localstatedir}/log/forgejo %attr(0700, forgejo, forgejo) %dir /var/log/forgejo
%{_bindir}/%{name} %{_bindir}/%{name}
%{_unitdir}/forgejo.service %attr(0644, root, root) /usr/lib/systemd/system/forgejo.service
%{_sysusersdir}/forgejo.conf %attr(-, forgejo, forgejo) %config(noreplace) %{_sysconfdir}/forgejo
%attr(0770, root, forgejo) %dir %{_sysconfdir}/forgejo
%changelog %changelog
* Wed May 20 2026 Jason Rothstein * Wed Apr 29 2026 Jason Rothstein
- 15.0.3 - 14.0.5
- golang >= 1.26.4
* Wed May 20 2026 Jason Rothstein
- 15.0.2
- golang >= 1.26.3
* Sun May 10 2026 Jason Rothstein
- Implement systemd macros and sysusers.d best practices
* Thu Apr 30 2026 Jason Rothstein
- 15.0.1
- Add Fedora 44
- Drop EL8 - Drop EL8
- Add Fedora 44
* Sat Apr 11 2026 Jason Rothstein
- 14.0.4
- golang >= 1.25.9
* Mon Mar 30 2026 Jason Rothstein
- 14.0.3
* Tue Feb 03 2026 Jason Rothstein
- 14.0.2
* Tue Feb 03 2026 Jason Rothstein
- 14.0.1
* Sun Feb 01 2026 Jason Rothstein
- 14.0.0
- golang >= 1.25.6
* Sat Apr 25 2026 Jason Rothstein
- 15.0.0
- golang >= 1.26.2
-1
View File
@@ -1 +0,0 @@
u forgejo - "Forgejo Git Service" /var/lib/forgejo /sbin/nologin