Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tux93:matrix
gotosocial
default-settings.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File default-settings.patch of Package gotosocial
From 91e5f41844403f4b74514bec94b0ffab4fbccca1 Mon Sep 17 00:00:00 2001 From: tux93 <tux93@opensuse.org> Date: Fri, 23 Feb 2024 18:10:34 +0100 Subject: [PATCH] Modify default paths to match packaging --- example/apparmor/gotosocial | 20 -------------------- example/config.yaml | 25 +++++++++++++++---------- example/gotosocial.service | 5 +++-- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/example/apparmor/gotosocial b/example/apparmor/gotosocial index 7f1bfc4b..8f1b1557 100644 --- a/example/apparmor/gotosocial +++ b/example/apparmor/gotosocial @@ -7,38 +7,18 @@ profile gotosocial flags=(attach_disconnected, mediate_deleted) { include <abstractions/nameservice> include <abstractions/user-tmp> - /gotosocial/gotosocial mrix, - /usr/local/bin/gotosocial mrix, - /usr/bin/gotosocial mrix, /usr/sbin/gotosocial mrix, - owner /gotosocial/{,**} r, - owner /gotosocial/db/* wk, - owner /gotosocial/storage/** wk, - # Allow GoToSocial to write logs # NOTE: you only need to allow write permissions to /var/log/syslog if you've # enabled logging to syslog. # owner /var/log/syslog w, - # These directories are not currently used by any of the recommended - # GoToSocial installation methods, but they may be used in the future and/or - # for custom installations. owner /etc/gotosocial/{,**} r, - owner /usr/local/etc/gotosocial/{,**} r, owner /usr/share/gotosocial/{,**} r, - owner /usr/local/share/gotosocial/{,**} r, - owner /usr/lib/gotosocial/{,**} r, - owner /usr/lib/gotosocial/db/* wk, - owner /usr/lib/gotosocial/storage/** wk, - owner /usr/local/lib/gotosocial/{,**} r, - owner /usr/local/lib/gotosocial/db/* wk, - owner /usr/local/lib/gotosocial/storage/** wk, owner /var/lib/gotosocial/{,**} r, owner /var/lib/gotosocial/db/* wk, owner /var/lib/gotosocial/storage/** wk, - owner /opt/gotosocial/{,**} r, - owner /run/gotosocial/{,**} r, /etc/mime.types r, /etc/services r, diff --git a/example/config.yaml b/example/config.yaml index 8843e42d..7230603a 100644 --- a/example/config.yaml +++ b/example/config.yaml @@ -44,8 +44,9 @@ log-client-ip: true # documented on https://pkg.go.dev/time#pkg-constants. # # Examples: ["2006-01-02T15:04:05.000Z07:00", ""] -# Default: "02/01/2006 15:04:05.000" -log-timestamp-format: "02/01/2006 15:04:05.000" +# Upstream Default: "02/01/2006 15:04:05.000" +# openSUSE Default: "" +log-timestamp-format: "" # String. Application name to use internally. # Examples: ["My Application","gotosocial"] @@ -265,13 +266,15 @@ cache: # String. Directory from which gotosocial will attempt to load html templates (.tmpl files). # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] -# Default: "./web/template/" -web-template-base-dir: "./web/template/" +# Upstream Default: "./web/template/" +# openSUSE Default: "/var/lib/gotosocial/template/" +web-template-base-dir: "/var/lib/gotosocial/template/" # String. Directory from which gotosocial will attempt to serve static web assets (images, scripts). # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] -# Default: "./web/assets/" -web-asset-base-dir: "./web/assets/" +# Upstream Default: "./web/assets/" +# openSUSE Default: "/usr/share/gotosocial/assets/" +web-asset-base-dir: "/usr/share/gotosocial/assets/" ########################### ##### INSTANCE CONFIG ##### @@ -545,8 +548,9 @@ storage-backend: "local" # this directory, and create new subdirectories and files within it. # Only required when running with the local storage backend. # Examples: ["/home/gotosocial/storage", "/opt/gotosocial/datastorage"] -# Default: "/gotosocial/storage" -storage-local-base-path: "/gotosocial/storage" +# Upstream Default: "/gotosocial/storage" +# openSUSE Default: "/var/lib/gotosocial/storage" +storage-local-base-path: "/var/lib/gotosocial/storage" # String. API endpoint of the S3 compatible service. # Only required when running with the s3 storage backend. @@ -654,8 +658,9 @@ letsencrypt-port: 80 # backup easier, but you might wish to move them elsewhere if they're also accessed by other services. # In any case, make sure GoToSocial has permissions to write to / read from this directory. # Examples: ["/home/gotosocial/storage/certs", "/acmecerts"] -# Default: "/gotosocial/storage/certs" -letsencrypt-cert-dir: "/gotosocial/storage/certs" +# Upstream Default: "/gotosocial/storage/certs" +# openSUSE Default: "/var/lib/gotosocial/storage/certs" +letsencrypt-cert-dir: "/var/lib/gotosocial/storage/certs" # String. Email address to use when registering LetsEncrypt certs. # Most likely, this will be the email address of the instance administrator. diff --git a/example/gotosocial.service b/example/gotosocial.service index 37a66c66..606ff8ee 100644 --- a/example/gotosocial.service +++ b/example/gotosocial.service @@ -12,10 +12,11 @@ Group=gotosocial Type=exec Restart=on-failure +AppArmorProfile=gotosocial # change if your path to the GoToSocial binary is different -ExecStart=/gotosocial/gotosocial --config-path config.yaml server start -WorkingDirectory=/gotosocial +ExecStart=/usr/sbin/gotosocial --config-path /etc/gotosocial/config.yaml server start +WorkingDirectory=/var/lib/gotosocial # Sandboxing options to harden security # Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html -- 2.44.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor