This document provides information for those interested in hacking on or contributing to SourceHut.
Here are some tips to expedite the installation procedure:
python3 run.py
instead.In addition to the runtime dependencies of our packages, building packages from source requires additional build-time dependencies:
sassc
for CSS pre-processingminify
for minifying CSSgo
for compiling the Go APIsmake
for makingDo this once, when starting with meta.sr.ht:
--recurse-submodules
.config.example.ini
to config.ini
and configure
everything following the instructions in the comments.When filling in the config.ini
file, remember the following:
srht-keygen
—
these can be found in the core.sr.ht repository.?sslmode=disable
to the end of your Postgres URL.Then, for each SERVICE
(e.g. meta.sr.ht
):
export SRHT_PATH=/path/to/core.sr.ht/srht
export PYTHONPATH=/path/to/core.sr.ht:/path/to/$SERVICE
make all
To avoid conflicts with the email
package, you should now unset PYTHONPATH
.
Note that core.sr.ht is not a service, but merely a repository of code shared between services.
For each service except meta.sr.ht:
config.example.ini
into meta.sr.ht's
config.ini
, modifying it according to the comments.ln -s /path/to/meta.sr.ht/config.ini config.ini
For each SERVICE
:
createdb $SERVICE
(e.g. createdb meta.sr.ht
)psql -d $SERVICE -f schema.sql
(e.g. psql -d meta.sr.ht -f schema.sql
)To run a service:
./api/api
(must be run before the following command)python3 run.py
For the APIs to be able to talk to each other, you need to correctly register
each service as a client. You will find more instructions on the
meta.example.org/oauth page, as well as in the OAuth
Reference. After you have created
the OAuth clients, find each respective database entry in the oauthclient
table, and set the preauthorized
column to TRUE
for each one.
We use git send-email and discuss patches (and other development topics) on the sr.ht-dev list. Please send your patches and development questions there.
commit 64dd454d025e91c76405cd1d04f51ea8e7a4f6a7 Author: wheezard <90904039+wheezard@users.noreply.github.com> Date: 2024-09-07T05:46:36+04:00 man: fixed a typo (missing closing parenthesis)