summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2022-07-25 00:02:33 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-08-01 14:30:48 +0000
commita1822d1e29bb80c196752a140aa627f5cb0e2cf1 (patch)
treed0f515cf17b5a32bc622de67a7b30696c65e52a5
parentMerge #182384: wolfssl: add patches for CVE-2022-34293 (diff)
downloadnixpkgs-origin/backport-182744-to-release-22.05.tar.gz
owncast: Fix statedirectory issue after upgradeorigin/backport-182744-to-release-22.05
The entrypoint script would ensure a symlink to the nix store exists in the state directory. The script would fail when trying to overwrite an existing symlink. Steps to trigger the issue: * Install owncast * Upgrade owncast * Garbage collect the store * Upgrade owncast I chose not to use the -f option in `ln`, as this is more explicit. (cherry picked from commit ac2d6bef042e817b7c8734a2aca4ffa904996425)
-rw-r--r--pkgs/servers/owncast/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/servers/owncast/default.nix b/pkgs/servers/owncast/default.nix
index 313d17e8e8d4..a4dff20d31e1 100644
--- a/pkgs/servers/owncast/default.nix
+++ b/pkgs/servers/owncast/default.nix
@@ -30,6 +30,7 @@ buildGoModule rec {
)
[ ! -d "$PWD/static" ] && (
+ [ -L "$PWD/static" ] && ${coreutils}/bin/rm "$PWD/static"
${coreutils}/bin/ln -s "${placeholder "out"}/static" "$PWD"
)
'';