diff --git a/.SRCINFO b/.SRCINFO index a4e15f8a4d17..540f0754f6c2 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = yamtrack pkgdesc = Self-hosted media tracker pkgver = 0.24.11 - pkgrel = 1 + pkgrel = 2 url = https://github.com/FuzzyGrim/Yamtrack install = yamtrack.install arch = any @@ -27,7 +27,7 @@ pkgbase = yamtrack source = yamtrack-celery-beat.service source = yamtrack-manage sha256sums = b6516defa8dad9f857a8ca4b8108f4c952b158fd950d1d89ecc0813dc6b1ebc1 - sha256sums = 92dd05b4efbde2bfb6fda55194c6af5ce3af0671e80cbf5409ebfd4bc6f10f32 + sha256sums = 491b49f33107a36727db4fd181b5f1da1d43a564737a3656d90d3acc22816a36 sha256sums = b802edf0f341b2ec008eedb79b1f4b4c7cec4b89428765a20fa6dd5db30e3a48 sha256sums = 1caecf3ac52fd3c0a9c2ada54d4130aba03ff454185c6b10f04f4cf514c4a3b7 sha256sums = cf0f5da164ef6effe5f68db54ac6a2511dd48856106d34d5235ab04a13081ae3 diff --git a/0001-arch-state-dir-and-whitenoise.patch b/0001-arch-state-dir-and-whitenoise.patch index fa12ee8514c8..b8637aa266ad 100644 --- a/0001-arch-state-dir-and-whitenoise.patch +++ b/0001-arch-state-dir-and-whitenoise.patch @@ -5,13 +5,13 @@ # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent + -+# Arch packaging: allow writable state (db + collectstatic output) outside the code dir. ++# Arch packaging: allow writable state (db + collectstatic + media) outside the code dir. +YAMTRACK_DATA_DIR = config("YAMTRACK_DATA_DIR", default=None) +DATA_DIR = Path(YAMTRACK_DATA_DIR) if YAMTRACK_DATA_DIR else BASE_DIR def secret(key, default=undefined, **kwargs): -@@ -131,6 +135,7 @@ +@@ -136,6 +140,7 @@ MIDDLEWARE = [ "debug_toolbar.middleware.DebugToolbarMiddleware", "django.middleware.security.SecurityMiddleware", @@ -37,7 +37,7 @@ }, } -@@ -289,10 +294,17 @@ +@@ -289,10 +294,23 @@ # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/stable/howto/static-files/ @@ -48,12 +48,18 @@ STATICFILES_DIRS = [BASE_DIR / "static"] + -+# WhiteNoise: serve static files directly from the app (reverse proxy is fine) ++# WhiteNoise: serve static files directly. Restoring 'default' is critical for health checks. +STORAGES = { ++ "default": { ++ "BACKEND": "django.core.files.storage.FileSystemStorage", ++ }, + "staticfiles": { + "BACKEND": "whitenoise.storage.CompressedStaticFilesStorage", + }, +} ++ ++MEDIA_ROOT = DATA_DIR / "media" ++MEDIA_URL = "/media/" if BASE_URL: STATIC_URL = f"{BASE_URL}/static/" diff --git a/PKGBUILD b/PKGBUILD index 95ce7360eced..14952968bce1 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=yamtrack pkgver=0.24.11 -pkgrel=1 +pkgrel=2 pkgdesc="Self-hosted media tracker" arch=('any') url="https://github.com/FuzzyGrim/Yamtrack" @@ -30,7 +30,7 @@ source=( ) sha256sums=('b6516defa8dad9f857a8ca4b8108f4c952b158fd950d1d89ecc0813dc6b1ebc1' - '92dd05b4efbde2bfb6fda55194c6af5ce3af0671e80cbf5409ebfd4bc6f10f32' + '491b49f33107a36727db4fd181b5f1da1d43a564737a3656d90d3acc22816a36' 'b802edf0f341b2ec008eedb79b1f4b4c7cec4b89428765a20fa6dd5db30e3a48' '1caecf3ac52fd3c0a9c2ada54d4130aba03ff454185c6b10f04f4cf514c4a3b7' 'cf0f5da164ef6effe5f68db54ac6a2511dd48856106d34d5235ab04a13081ae3'