I would classify following as a missing section of the "Forgejo Administrator Guide" documentation.
- Installation
- [Missing part] From Source
I'm RPM packaging forgejo the first time and struggling with
some integration config choices, so - bear with me.
The build section looks like:
%build
sed -i s/gitea/%{name}/ contrib/autocompletion/bash_autocomplete
TAGS="bindata sqlite sqlite_unlock_notify" \
LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.CustomPath=%{_sysconfdir}/%{name}\" \
-X \"code.gitea.io/gitea/modules/setting.CustomConf=%{_sysconfdir}/%{name}/conf/app.ini\" \
-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=%{_sharedstatedir}/%{name}\" \
-X \"main.Version=%{full_version}\" " \
make build
Problem description:
The setting.StaticRootPath variable can also be configured like the others above but I leave it to fallback to the internal default.
The default for StaticRootPath is then the value of AppWorkPath. In my case as above configured, it is /var/lib/forgejo.
So, my understanding is that this StaticRootPath path delivers the options,templates, public directories. When running
forgejo I noticed that it ignores the contents for instance of /var/lib/forgejo/public/ instead delivers the files out of /etc/forgejo/public which is the CustomPath + /public. Even forcing the StaticRootPath being a specific directory via the STATIC_ROOT_PATH key in app.ini config does not honour the files in it. It stills deliver it out of CustomPath.
What's the purpose of the setting.StaticRootPath / STATIC_ROOT_PATH key for run-time (and build-time)?
What's the relation between CustomPath and StaticRootPath ?
The goal is to put static content (when needed for customization) into an appropriate location that complies with packaging guidelines of the target distribution (in this case FEDORA/RHEL/SUSE).
Thanks!
I would classify following as a missing section of the "Forgejo Administrator Guide" documentation.
- Installation
- [Missing part] From Source
----
I'm RPM packaging forgejo the first time and struggling with
some integration config choices, so - bear with me.
The build section looks like:
```
%build
sed -i s/gitea/%{name}/ contrib/autocompletion/bash_autocomplete
TAGS="bindata sqlite sqlite_unlock_notify" \
LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.CustomPath=%{_sysconfdir}/%{name}\" \
-X \"code.gitea.io/gitea/modules/setting.CustomConf=%{_sysconfdir}/%{name}/conf/app.ini\" \
-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=%{_sharedstatedir}/%{name}\" \
-X \"main.Version=%{full_version}\" " \
make build
```
Problem description:
The _setting.StaticRootPath_ variable can also be configured like the others above but I leave it to fallback to the internal default.
The default for _StaticRootPath_ is then the value of _AppWorkPath_. In my case as above configured, it is _/var/lib/forgejo_.
So, my understanding is that this _StaticRootPath_ path delivers the _options,templates, public_ directories. When running
forgejo I noticed that it ignores the contents for instance of _/var/lib/forgejo/public/_ instead delivers the files out of _/etc/forgejo/public_ which is the _CustomPath_ + /public. Even forcing the _StaticRootPath_ being a specific directory via the STATIC_ROOT_PATH key in app.ini config does not honour the files in it. It stills deliver it out of _CustomPath_.
What's the purpose of the _setting.StaticRootPath / STATIC_ROOT_PATH_ key for run-time (and build-time)?
What's the relation between _CustomPath_ and _StaticRootPath_ ?
The goal is to put static content (when needed for customization) into an appropriate location that complies with packaging guidelines of the target distribution (in this case FEDORA/RHEL/SUSE).
Thanks!