Bug 2396365 - Build forgejo for EPEL 9
Summary: Build forgejo for EPEL 9
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: forgejo
Version: epel9
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-09-18 12:22 UTC by Jos Vos
Modified: 2025-11-06 18:59 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jos Vos 2025-09-18 12:22:55 UTC
The forgejo package was added to EPEL 10.  Is it possible to also add it to EPEL 9 or are there technical reasons so that this is not easily possible?  Most servers still run with RHEL 9-derivates.

Comment 1 Greg Bailey 2025-10-20 15:11:04 UTC
I also need Forgejo on a server running a RHEL 9 derivative. Looks like the only change has to do with handling of the first patch file, as I get this error when building against EPEL 9:

error: %patch N no longer applies Patch0 implicitly, add 0 (or -P 0): %patch 1 -p1 -b .pagure-migrator

If I "cheat" and modify the spec file to make the first patch look like a source file vs a patch file, then it builds (and runs) fine on EPEL 9:

diff --git a/forgejo.spec b/forgejo.spec
index 9f3080a..dc0f0e0 100644
--- a/forgejo.spec
+++ b/forgejo.spec
@@ -53,7 +53,7 @@ Source9:        forgejo.sysconfig
 Source10:       forgejo-node-deps-provides.py
 Source11:       forgejo-node-get-licenses.py
 
-Patch0:         forgejo-10.0.1-app.ini.tmpl.patch
+Source12:       forgejo-10.0.1-app.ini.tmpl.patch
 # Pagure migrator plugin. Generate from the pagure-migrator branch of
 # https://codeberg.org/ryanlerch/forgejo like this (assuming the branch is based off of the
 # v12.0/forgejo upstream branch):
@@ -93,7 +93,7 @@ them!
 %prep
 %{gpgverify} --keyring='%{S:2}' --signature='%{S:1}' --data='%{S:0}'
 %autosetup -N -n %{name}-src-%{version}
-patch --input=%{PATCH0} --output=app.ini.tmpl custom/conf/app.example.ini
+patch --input=%{SOURCE12} --output=app.ini.tmpl custom/conf/app.example.ini
 
 %patch 1 -p1 -b .pagure-migrator

Obviously the clean solution is to use some kind of RPM conditional for 0%{?rhel} < 10, but I'm only a part-time Fedora packager and I have to go re-read this stuff when making these kinds of updates...

Comment 2 Greg Bailey 2025-11-06 18:59:52 UTC
I took a stab at building this in a copr repo targeting EPEL 9:

https://copr.fedorainfracloud.org/coprs/gbailey/forgejo/

It's basically using golang 1.25 from Fedora 43 built for EPEL 9, and building the SRPM of Forgejo, also from Fedora 43 Updates.


Note You need to log in before you can comment on or make changes to this bug.