Merge pull request #67 from privatevoid-net/updates-20230320

Updates 20230320
This commit is contained in:
Max Headroom 2023-03-22 00:00:53 +00:00 committed by GitHub
commit 92c8722c4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 224 additions and 146 deletions

View file

@ -8,11 +8,11 @@
]
},
"locked": {
"lastModified": 1675176355,
"narHash": "sha256-Qjxh5cmN56siY97mzmBLI1+cdjXSPqmfPVsKxBvHmwI=",
"lastModified": 1677969766,
"narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=",
"owner": "ryantm",
"repo": "agenix",
"rev": "b7ffcfe77f817d9ee992640ba1f270718d197f28",
"rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e",
"type": "github"
},
"original": {
@ -96,11 +96,11 @@
]
},
"locked": {
"lastModified": 1675340818,
"narHash": "sha256-GAzTgOvonq4K3CVyyKZGbCnqdLi6nRe78t8ko/mLxL0=",
"lastModified": 1678957337,
"narHash": "sha256-Gw4nVbuKRdTwPngeOZQOzH/IFowmz4LryMPDiJN/ah4=",
"owner": "numtide",
"repo": "devshell",
"rev": "2e19b92980a79118351ec12496a81c49bd674d8a",
"rev": "3e0e60ab37cd0bf7ab59888f5c32499d851edb47",
"type": "github"
},
"original": {
@ -166,6 +166,7 @@
},
"drv-parts": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": [
"flake-parts"
],
@ -174,11 +175,11 @@
]
},
"locked": {
"lastModified": 1674180232,
"narHash": "sha256-Eqrcd6ayrwLthrOkQp8VshxUphC1is/lTk++8yC0/GA=",
"lastModified": 1679210066,
"narHash": "sha256-0t6UZrLmIEsH3R8Jk8mo2XFGIPJmSWLsCR6HlSp3va8=",
"owner": "DavHau",
"repo": "drv-parts",
"rev": "26eceebedcffa68f93a761dde45cf0789f59be22",
"rev": "38f59f9eb2dbcf9ad6b939ec47c005033445f13e",
"type": "github"
},
"original": {
@ -187,6 +188,38 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -194,11 +227,11 @@
]
},
"locked": {
"lastModified": 1675295133,
"narHash": "sha256-dU8fuLL98WFXG0VnRgM00bqKX6CEPBLybhiIDIgO45o=",
"lastModified": 1678379998,
"narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "bf53492df08f3178ce85e0c9df8ed8d03c030c9f",
"rev": "c13d60b89adea3dc20704c045ec4d50dd964d447",
"type": "github"
},
"original": {
@ -209,11 +242,11 @@
},
"flake-utils": {
"locked": {
"lastModified": 1667077288,
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
@ -222,17 +255,40 @@
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hercules-ci-agent",
"pre-commit-hooks-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"haskell-flake": {
"locked": {
"lastModified": 1674066917,
"narHash": "sha256-nRSAb7N64zmAbXUoVVqY/s2LbSIdDTdfN0sSKG5/CCY=",
"lastModified": 1678745009,
"narHash": "sha256-ujfwSrkxThmHJozibkCnJmlXLVyxm+Cbo2Q4wXPbCS4=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "c6ff897db9abdd4e5ff7911b5f9234a1380c6611",
"rev": "26852ade574c712bc3912ad28de52b0c4cf7d4cb",
"type": "github"
},
"original": {
"owner": "srid",
"ref": "0.2.0",
"repo": "haskell-flake",
"type": "github"
}
@ -252,11 +308,11 @@
"pre-commit-hooks-nix": "pre-commit-hooks-nix"
},
"locked": {
"lastModified": 1675328703,
"narHash": "sha256-23W8Msfs/8+MbWzsI+gqtc6dyj83v+6GX8hLWEtlx/Q=",
"lastModified": 1679065768,
"narHash": "sha256-VYzLS/51fPx8wId7QeLJWHC9oL4QRbOJwu96G4wd/qA=",
"owner": "hercules-ci",
"repo": "hercules-ci-agent",
"rev": "72bf956c45ef97b801b6f4e5b4dbb8097f843ed8",
"rev": "3a118a985ce57c2a0d8ce567b1f007d57933c540",
"type": "github"
},
"original": {
@ -278,11 +334,11 @@
]
},
"locked": {
"lastModified": 1675345398,
"narHash": "sha256-rxyl5bqLQ99CoFkXArrtY2MtXMBtiOcoEH6onWwjY50=",
"lastModified": 1678923240,
"narHash": "sha256-qoa7OvbboojbwZnCaL5+r2pFNhLkxRUsD9+RaoM9zjw=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "0cc800cb3af7465538e619466ea35f75fde499fc",
"rev": "0eec846f63e69f935ae1c06280b3b444f98d95e5",
"type": "github"
},
"original": {
@ -362,11 +418,11 @@
},
"nix-filter": {
"locked": {
"lastModified": 1675361037,
"narHash": "sha256-CTbDuDxFD3U3g/dWUB+r+B/snIe+qqP1R+1myuFGe2I=",
"lastModified": 1678109515,
"narHash": "sha256-C2X+qC80K2C1TOYZT8nabgo05Dw2HST/pSn6s+n6BO8=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "e1b2f96c2a31415f362268bc48c3fccf47dff6eb",
"rev": "aa9ff6ce4a7f19af6415fb3721eaa513ea6c763c",
"type": "github"
},
"original": {
@ -387,11 +443,11 @@
},
"locked": {
"host": "git.privatevoid.net",
"lastModified": 1674866006,
"narHash": "sha256-6xWH1moJwBwD/AbVbM6DRgCqF95N27RSGZCV2JJogI8=",
"lastModified": 1677536397,
"narHash": "sha256-pKp+dmOJc3/9R3dBP30u2zXOyCuF5dVzgFlS1upSwZk=",
"owner": "max",
"repo": "nix-super",
"rev": "792d83f2623ed0a54fa994c92305dcadf2e18369",
"rev": "8eb40776e51819038fbb8a087d9885842451a333",
"type": "gitlab"
},
"original": {
@ -403,11 +459,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1675512093,
"narHash": "sha256-u1CY4feK14B57E6T+0Bhkuoj8dpBxCPrWO+SP87UVP8=",
"lastModified": 1679318992,
"narHash": "sha256-uoj5Oy6hruIHuxzfQZtcalObe5kPrX9v+ClUMFEOzmE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8e8240194eda25b61449f29bb5131e02b28a5486",
"rev": "e2c97799da5f5cd87adfa5017fba971771e123ef",
"type": "github"
},
"original": {
@ -417,6 +473,22 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1673800717,
"narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"poetry2nix": {
"flake": false,
"locked": {
@ -436,18 +508,21 @@
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"hercules-ci-agent",
"nixpkgs"
]
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1667760143,
"narHash": "sha256-+X5CyeNEKp41bY/I1AJgW/fn69q5cLJ1bgiaMMCKB3M=",
"lastModified": 1678376203,
"narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "06f48d63d473516ce5b8abe70d15be96a0147fcd",
"rev": "1a20b9708962096ec2481eeb2ddca29ed747770a",
"type": "github"
},
"original": {
@ -458,11 +533,11 @@
},
"repin-flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {

View file

@ -13,7 +13,7 @@
imports = [
inputs.hercules-ci-effects.flakeModule
inputs.drv-parts.flakeModule
inputs.drv-parts.modules.flake-parts.drv-parts
inputs.dream2nix.flakeModuleBeta
./hosts/part.nix
./modules/part.nix

View file

@ -4,8 +4,6 @@ let
inherit (config) links;
dataDir = "/srv/storage/private/tempo";
tempoConfig = {
search_enabled = true;
metrics_generator_enabled = true;
server = {
http_listen_address = links.tempo.ipv4;
http_listen_port = links.tempo.port;
@ -32,13 +30,8 @@ let
};
storage.trace = {
backend = "local";
block = {
bloom_filter_false_positive = 0.05;
index_downsample_bytes = 1000;
encoding = "zstd";
};
block.bloom_filter_false_positive = 0.05;
wal.path = "${dataDir}/wal";
wal.encoding = "snappy";
local.path = "${dataDir}/blocks";
pool = {
max_workers = 16;

View file

@ -1,4 +1,4 @@
{ config, dependencySets, lib, ... }:
{ config, dependencySets, drv-parts, lib, ... }:
let
inherit (config) deps;
@ -19,7 +19,11 @@ let
in
{
pname = lib.mkIf hasPyproject (lib.mkDefault pyproject.tool.poetry.name);
imports = [
drv-parts.modules.drv-parts.mkDerivation
];
name = lib.mkIf hasPyproject (lib.mkDefault pyproject.tool.poetry.name);
version = lib.mkIf hasPyproject (lib.mkDefault pyproject.tool.poetry.version);
deps = { pkgs, python3Packages, ... }: {
@ -42,9 +46,16 @@ in
;
inherit (pkgs)
ensureNewerSourcesForZipFilesHook
stdenv
;
};
env = {
LANG = "${if deps.python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
};
mkDerivation = {
nativeBuildInputs = with deps; [
python
wrapPython
@ -82,10 +93,6 @@ in
python
];
env = {
LANG = "${if deps.python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
};
doCheck = false;
doInstallCheck = lib.mkDefault true;
installCheckInputs = lib.optionals (config.format == "setuptools") [
@ -97,4 +104,5 @@ in
'');
outputs = [ "out" ] ++ lib.optional withDistOutput "dist";
};
}

View file

@ -6,7 +6,7 @@
./dependency-sets
];
_module.args = {
drv-backends = inputs.drv-parts.drv-backends // config.drv-backends;
drv-backends = inputs.drv-parts.modules.drv-parts // config.drv-backends;
};
};
}

View file

@ -5,8 +5,6 @@ nixosTest {
nodes.machine = let
dataDir = "/var/lib/tempo";
tempoConfig = {
search_enabled = true;
metrics_generator_enabled = true;
server = {
http_listen_address = "127.0.0.1";
http_listen_port = 8888;
@ -25,13 +23,8 @@ nixosTest {
};
storage.trace = {
backend = "local";
block = {
bloom_filter_false_positive = 0.05;
index_downsample_bytes = 1000;
encoding = "zstd";
};
block.bloom_filter_false_positive = 0.05;
wal.path = "${dataDir}/wal";
wal.encoding = "snappy";
local.path = "${dataDir}/blocks";
pool = {
max_workers = 16;
@ -73,6 +66,6 @@ nixosTest {
testScript = ''
machine.wait_for_unit("tempo.service")
machine.wait_for_open_port(8888)
machine.succeed("curl --fail http://127.0.0.1:8888/status/version")
machine.succeed("curl -s --fail http://127.0.0.1:8888/status/version")
'';
}

View file

@ -1,14 +1,22 @@
diff --git a/server/database.js b/server/database.js
index b17e7f4..7b77f84 100644
index 575827f3..8e288095 100644
--- a/server/database.js
+++ b/server/database.js
@@ -74,13 +74,13 @@ class Database {
@@ -87,20 +87,20 @@ class Database {
*/
static init(args) {
// Data Directory (must be end with "/")
- Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/";
- Database.path = Database.dataDir + "kuma.db";
+ Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data";
// Plugin feature is working only if the dataDir = "./data";
- if (Database.dataDir !== "./data/") {
+ if (Database.dataDir !== "./data") {
log.warn("PLUGIN", "Warning: In order to enable plugin feature, you need to use the default data directory: ./data/");
PluginsManager.disable = true;
}
- Database.path = Database.dataDir + "kuma.db";
+ Database.path = Database.dataDir + "/kuma.db";
if (! fs.existsSync(Database.dataDir)) {
fs.mkdirSync(Database.dataDir, { recursive: true });
@ -19,7 +27,7 @@ index b17e7f4..7b77f84 100644
if (! fs.existsSync(Database.uploadDir)) {
fs.mkdirSync(Database.uploadDir, { recursive: true });
@@ -429,7 +429,7 @@ class Database {
@@ -455,7 +455,7 @@ class Database {
static backup(version) {
if (! this.backupPath) {
log.info("db", "Backing up the database");

View file

@ -63,7 +63,7 @@ super: rec {
prometheus-jitsi-exporter = patch super.prometheus-jitsi-exporter "patches/base/prometheus-jitsi-exporter";
tempo = (super.tempo.override { buildGoModule = super.buildGo118Module; }).overrideAttrs (_: {
tempo = (super.tempo.override { buildGoModule = super.buildGo119Module; }).overrideAttrs (_: {
version = builtins.substring 1 (-1) pins.tempo.version;
src = super.npins.mkSource pins.tempo;
subPackages = [ "cmd/tempo" ];

View file

@ -24,8 +24,8 @@
drv-backends.buildPythonPackage
];
pyprojectToml = ./pyproject.toml;
inherit (pkgs) stdenv;
mkDerivation = {
propagatedBuildInputs = deps;
src = with inputs.nix-filter.lib; filter {
@ -37,4 +37,5 @@
};
};
};
};
}

View file

@ -9,10 +9,10 @@
},
"pre_releases": false,
"version_upper_bound": null,
"version": "v2.2.3",
"revision": "4ea14c853ee7b9c1a211a08e386fb323870e2ec2",
"url": "https://api.github.com/repos/cinnyapp/cinny/tarball/v2.2.3",
"hash": "1h470vbdlayncg5525991bmf2iyzzs9nncz1w6hlfhkmyl2d0wwy"
"version": "v2.2.4",
"revision": "a6fb44e1abe9ad48136dee8e7d053e639f37bedc",
"url": "https://api.github.com/repos/cinnyapp/cinny/tarball/v2.2.4",
"hash": "0m7y1hzsdmlhp39hdv2fazhm07kskgb5qf2khhyxrs8nlas4fbha"
},
"excalidraw": {
"type": "Git",
@ -22,9 +22,9 @@
"repo": "excalidraw"
},
"branch": "master",
"revision": "5ae39c9292bb69853b69a67ff1889380a651d6ca",
"url": "https://github.com/excalidraw/excalidraw/archive/5ae39c9292bb69853b69a67ff1889380a651d6ca.tar.gz",
"hash": "1h0frqzkvsk5p4x1g4yxfb460wj8bb699l7x4lhpb2rmd9qgxp90"
"revision": "ac4c8b3ca798c486a3c86ad71eb4d16352a486be",
"url": "https://github.com/excalidraw/excalidraw/archive/ac4c8b3ca798c486a3c86ad71eb4d16352a486be.tar.gz",
"hash": "03gyrg9ykm6cw2bhw1a8f30yhazr4bsfahmi03fpbcb80v3q2vvz"
},
"searxng": {
"type": "Git",
@ -34,9 +34,9 @@
"repo": "searxng"
},
"branch": "master",
"revision": "9d102fb08ff4a7dc04d093561adde60436e3f69e",
"url": "https://github.com/searxng/searxng/archive/9d102fb08ff4a7dc04d093561adde60436e3f69e.tar.gz",
"hash": "17ay25ipybs46khycsjgy1qf6q5127gn8v9vw7fv9p2drswmhzj0"
"revision": "9dc36965bbb118db64c0bf2d3f54389d4d484670",
"url": "https://github.com/searxng/searxng/archive/9dc36965bbb118db64c0bf2d3f54389d4d484670.tar.gz",
"hash": "0h5dvnrp3v88mgv9snccsrqsvy20mi3sga7s408fmid2n248ws8k"
},
"stevenblack-hosts": {
"type": "GitRelease",
@ -47,10 +47,10 @@
},
"pre_releases": false,
"version_upper_bound": null,
"version": "3.12.1",
"revision": "a5b36aac7afc39d46af5324769fab5cbfc1c5bab",
"url": "https://api.github.com/repos/StevenBlack/hosts/tarball/3.12.1",
"hash": "09wrz3ydlw0yx2pw18vn1dl8v7914h4nnjg0fna0lacc0wyhdmj3"
"version": "3.12.15",
"revision": "0cfed81116bf22d3719fffe5b08b72eab115b3e1",
"url": "https://api.github.com/repos/StevenBlack/hosts/tarball/3.12.15",
"hash": "10b0y5wpbylpl4snczfg0dw9cr6dkb5iryqzx3vqm822p7kmg0qy"
},
"tempo": {
"type": "GitRelease",
@ -61,10 +61,10 @@
},
"pre_releases": false,
"version_upper_bound": null,
"version": "v1.5.0",
"revision": "1a97bea16259be7863dda77e1a6df09eb048b202",
"url": "https://api.github.com/repos/grafana/tempo/tarball/v1.5.0",
"hash": "0hvpp4kd59p22p25ngp2lrm6f2va36q0j8xx4k223n3hnhawkmf3"
"version": "v2.0.1",
"revision": "989486f82a1d69160e9096fcdab57b8e63294d4b",
"url": "https://api.github.com/repos/grafana/tempo/tarball/v2.0.1",
"hash": "02am43gv7yx6fa0asc5msyjppqvhksfwpr8ha013cfr518p0qs82"
},
"uptime-kuma": {
"type": "GitRelease",
@ -75,10 +75,10 @@
},
"pre_releases": false,
"version_upper_bound": null,
"version": "1.19.6",
"revision": "2b57b3e863954c9d9cf7911b76f600bb8de4c41b",
"url": "https://api.github.com/repos/louislam/uptime-kuma/tarball/1.19.6",
"hash": "0kwljvnjd0wqxk6pjj66c82kc4wflc1cs8c2lz5cngsghmxjck8y"
"version": "1.21.0",
"revision": "72317633d982a111f74c23c6b675bdba93e8f6aa",
"url": "https://api.github.com/repos/louislam/uptime-kuma/tarball/1.21.0",
"hash": "0hghh8h4zcxaxlb42cbj84d3m0nwg40k5v3sba05px1iz4y7637k"
}
},
"version": 2

View file

@ -11,7 +11,7 @@ let
src = fetchzip {
name = "cinny-tarball-${version}";
url = "https://github.com/${repo.owner}/${repo.repo}/releases/download/${cinny.version}/cinny-${cinny.version}.tar.gz";
sha256 = "sha256-CmjWlHkVUxFQXZ8kF3fW6XSbgb5b6mnsm0t+WGb3ZTM=";
sha256 = "sha256-zMvCpjt74U8Fsuw8husaXtcccD5eF4wknOw0YWT9b/M=";
};
buildCommand = ''

View file

@ -13,7 +13,7 @@ toPythonModule (buildPythonApplication rec {
patches = [
# wait for https://github.com/NixOS/nixpkgs/pull/211654
./revert-flask-babel-3.0.0.patch
./revert-flask-babel-3.0.1.patch
];
postPatch = ''

View file

@ -4,8 +4,8 @@
certifi==2022.12.7
babel==2.11.0
+flask-babel==2.0.0
-flask-babel==3.0.0
flask==2.2.2
-flask-babel==3.0.1
flask==2.2.3
jinja2==3.1.2
lxml==4.9.2
--- b/searx/locales.py