mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
pretix: 2024.7.1 -> 2024.8.0
https://pretix.eu/about/en/blog/20240828-release-2024-8/ https://github.com/pretix/pretix/compare/refs/tags/v2024.7.1...v2024.8.0
This commit is contained in:
parent
24699e786c
commit
132814bc5a
@ -51,13 +51,13 @@ let
|
||||
};
|
||||
|
||||
pname = "pretix";
|
||||
version = "2024.7.1";
|
||||
version = "2024.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pretix";
|
||||
repo = "pretix";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-lOcV3+CNGyKR0QiQXr/hP/9rhWauEvnSLOvxmQa/DSg=";
|
||||
hash = "sha256-3flZoDzS3SI7nAi1skEqVPXJM9vSBrGN+F0esbYKQDw=";
|
||||
};
|
||||
|
||||
npmDeps = buildNpmPackage {
|
||||
@ -65,7 +65,7 @@ let
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "${src.name}/src/pretix/static/npm_dir";
|
||||
npmDepsHash = "sha256-BfvKuwB5VLX09Lxji+EpMBvZeKTIQvptVtrHSRYY+14=";
|
||||
npmDepsHash = "sha256-ZS+80LLyS2UBnVGRclYhwVwF1BR17D/79F2moQtqh80=";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@ -87,17 +87,15 @@ python.pkgs.buildPythonApplication rec {
|
||||
# Discover pretix.plugin entrypoints during build and add them into
|
||||
# INSTALLED_APPS, so that their static files are collected.
|
||||
./plugin-build.patch
|
||||
|
||||
# https://github.com/pretix/pretix/pull/4362
|
||||
# Fix TOCTOU race in directory creation
|
||||
./pr4362.patch
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"importlib-metadata"
|
||||
"kombu"
|
||||
"markdown"
|
||||
"pillow"
|
||||
"protobuf"
|
||||
"pyjwt"
|
||||
"python-bidi"
|
||||
"requests"
|
||||
"sentry-sdk"
|
||||
@ -140,7 +138,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
cryptography
|
||||
css-inline
|
||||
defusedcsv
|
||||
dj-static
|
||||
django
|
||||
django-bootstrap3
|
||||
django-compressor
|
||||
@ -199,7 +196,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
sentry-sdk
|
||||
sepaxml
|
||||
slimit
|
||||
static3
|
||||
stripe
|
||||
text-unidecode
|
||||
tlds
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 5688f3624005d02803f2a434db025f367b4963d3 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Weinelt <hexa@darmstadt.ccc.de>
|
||||
Date: Thu, 1 Aug 2024 02:39:59 +0200
|
||||
Subject: [PATCH] Prevent race condition in directory creation
|
||||
|
||||
Checking whether a path does not exist before trying to create it does
|
||||
not follow the Python paradigm of asking for forgiveness, rather than
|
||||
permission, and opens up a time-of-check to time-of-use race.
|
||||
---
|
||||
src/pretix/settings.py | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/pretix/settings.py b/src/pretix/settings.py
|
||||
index 81ff644be..854187f05 100644
|
||||
--- a/src/pretix/settings.py
|
||||
+++ b/src/pretix/settings.py
|
||||
@@ -37,6 +37,7 @@ import configparser
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
+from contextlib import suppress
|
||||
from json import loads
|
||||
from urllib.parse import urlparse
|
||||
|
||||
@@ -70,14 +71,14 @@ MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
|
||||
PROFILE_DIR = os.path.join(DATA_DIR, 'profiles')
|
||||
CACHE_DIR = config.get('pretix', 'cachedir', fallback=os.path.join(DATA_DIR, 'cache'))
|
||||
|
||||
-if not os.path.exists(DATA_DIR):
|
||||
- os.mkdir(DATA_DIR)
|
||||
-if not os.path.exists(LOG_DIR):
|
||||
- os.mkdir(LOG_DIR)
|
||||
-if not os.path.exists(MEDIA_ROOT):
|
||||
- os.mkdir(MEDIA_ROOT)
|
||||
-if not os.path.exists(CACHE_DIR):
|
||||
- os.mkdir(CACHE_DIR)
|
||||
+def mkdir(path):
|
||||
+ with suppress(FileExistsError):
|
||||
+ os.mkdir(path)
|
||||
+
|
||||
+mkdir(DATA_DIR)
|
||||
+mkdir(LOG_DIR)
|
||||
+mkdir(MEDIA_ROOT)
|
||||
+mkdir(CACHE_DIR)
|
||||
|
||||
if config.has_option('django', 'secret'):
|
||||
SECRET_KEY = config.get('django', 'secret')
|
||||
--
|
||||
2.45.2
|
||||
|
Loading…
Reference in New Issue
Block a user