pretix: 2024.7.1 -> 2024.8.0 (#338156)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pretix-zugferd";
|
||||
version = "2.2.0";
|
||||
version = "2.2.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pretix";
|
||||
repo = "pretix-zugferd";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ozFDNIA+0feHrHHvxcf+6Jh4L83svmPEE/rerd4Yim8=";
|
||||
hash = "sha256-AJbrx1n32YAZnJGYX67qqaEnOeegYfSUEekvQnmjt+0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
flit-core,
|
||||
django,
|
||||
djangorestframework,
|
||||
@@ -12,12 +12,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-filter";
|
||||
version = "24.2";
|
||||
version = "24.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-SOX8HaPM1soNX5u1UJc1GM6Xek7d6dKooVSn9PC5+W4=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "carltongibson";
|
||||
repo = "django-filter";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-4q/x9FO9ErKnGeJDEXDMcvUKA4nlA7nkwwM2xj3WGWs=";
|
||||
};
|
||||
|
||||
build-system = [ flit-core ];
|
||||
|
||||
Reference in New Issue
Block a user