FS#66011 - [gitea] CSS and JS files are missing

Attached to Project: Community Packages
Opened by Tilo Brueckner (blueperil) - Saturday, 28 March 2020, 20:00 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 02 April 2020, 21:08 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:
Gitea is missing CSS and JS files.
as described in https://github.com/go-gitea/gitea/commit/d9c67a8c903fa9927bad28f5fcb816f89f8200eb#diff-3254677a7917c6c01f55212f86c57fbf CSS and JS files won't be build anymore. The build and packaging process needs to be adjusted.

Steps to reproduce:
Update from Gitea 1.11.1 to 1.11.3
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Thursday, 02 April 2020, 21:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.11.4-2
Comment by António Maia (stickmanChampion) - Sunday, 29 March 2020, 13:14 GMT
Can confirm, same thing happened to me after the update.
Comment by Maxime Gauduin (Alucryd) - Sunday, 29 March 2020, 15:50 GMT
They are still built, even with the current PKGBUILD, but it seems they broke bindata. Will ship the files in /usr/share/gitea temporarily, please run pacdiff after you update to merge the changes to the default config. You want to merge STATIC_ROOT_PATH in particular.

In the meantime we'll look for a way to get bindata working again.
Comment by Aurélien Ooms (aureooms) - Tuesday, 31 March 2020, 11:48 GMT
Temporary fix is to set STATIC_ROOT_PATH = /usr/share/gitea in /etc/gitea/app.ini
Comment by Maxime Gauduin (Alucryd) - Wednesday, 01 April 2020, 18:36 GMT
1.11.4 fixes bindata, just pushed it to community and reverted the STATIC_ROOT_PATH.
Comment by danieltetraquark (danieltetraquark) - Wednesday, 01 April 2020, 22:11 GMT
  • Field changed: Percent Complete (100% → 0%)

After a upgrade to 1.11.4, the CSS is broken in Firefox, the console shows:

> Stylesheet https://host/user/login was not loaded because its MIME type, "text/html", is not "text/css". (roughly translated from German)


> SyntaxError: expected expression, got '<' (for index.js),

/js/index.js?v=[somestring] returns
```
<a href="/user/login">Found</a>.

```
Comment by Dan Andresan (forumache) - Wednesday, 01 April 2020, 22:59 GMT
Confirmed, it happens again with 1.11.4.
Comment by John Doe (hillbicks) - Thursday, 02 April 2020, 14:49 GMT
with the latest update you have to leave STATIC_ROOT_PATH empty again, then it works.
Comment by Tilo Brueckner (blueperil) - Thursday, 02 April 2020, 15:00 GMT
Doesn't work for me with emptied STATIC_ROOT_PATH
Comment by danieltetraquark (danieltetraquark) - Thursday, 02 April 2020, 15:07 GMT
Also doesn't work for me with empy STATIC_ROOT_PATH.
Comment by Dan Andresan (forumache) - Thursday, 02 April 2020, 15:20 GMT
Doesn't work with (I tried all kind of "emptiness"):
STATIC_ROOT_PATH =
or
STATIC_ROOT_PATH = ""
or
#STATIC_ROOT_PATH = /usr/share/gitea

It works only with:
STATIC_ROOT_PATH = /usr/share/gitea
Comment by Christian (CountMurphy) - Thursday, 02 April 2020, 18:52 GMT
Can confirm this is happening with 11.4

STATIC_ROOT as empty does nothing
I don't see how it can work with STATIC_ROOT_PATH set to /usr/share/gitea, as gitea lives in /usr/bin/gitea under 11.4 (no setting static root there didn't fix it either)
Comment by Maxime Gauduin (Alucryd) - Thursday, 02 April 2020, 20:52 GMT
Okay I can reproduce, the package I build locally is fine, but the one built in a chroot isn't :/ Will try to find why.
Comment by Maxime Gauduin (Alucryd) - Thursday, 02 April 2020, 21:08 GMT
Okay, I have no idea what's going on, I went back to shipping the static files separately. You'll have to reinstate the previously emptied STATIC_ROOT_PATH to /usr/share/gitea.

Loading...