Compare commits
No commits in common. "640810a16c96a94ca17b7ef173d553d17e1c12ea" and "40695041e7e8c921104379ef2c200005b82c70b5" have entirely different histories.
640810a16c
...
40695041e7
4 changed files with 1 additions and 85 deletions
|
@ -94,9 +94,6 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./system/nixos-wsl/configuration.nix
|
./system/nixos-wsl/configuration.nix
|
||||||
./system/dotnet_os_codename-workaround.nix
|
|
||||||
# Source of this fix file is
|
|
||||||
# https://github.com/nazarewk-iac/nix-configs/blob/main/modules/ascii-workaround.nix
|
|
||||||
./system/nix_lix.nix
|
./system/nix_lix.nix
|
||||||
nixos-wsl.nixosModules.wsl
|
nixos-wsl.nixosModules.wsl
|
||||||
lix-module.nixosModules.default
|
lix-module.nixosModules.default
|
||||||
|
@ -141,11 +138,6 @@
|
||||||
ps3dec = pkgs.callPackage ./home/packages/ps3dec/package.nix {};
|
ps3dec = pkgs.callPackage ./home/packages/ps3dec/package.nix {};
|
||||||
sabretools = pkgs.callPackage ./home/packages/sabretools/package.nix {};
|
sabretools = pkgs.callPackage ./home/packages/sabretools/package.nix {};
|
||||||
rom-properties = pkgs.callPackage ./home/packages/rom-properties/package.nix {};
|
rom-properties = pkgs.callPackage ./home/packages/rom-properties/package.nix {};
|
||||||
new_rclone = pkgs.rclone.overrideAttrs (
|
|
||||||
oldAttrs: {
|
|
||||||
patches = [ ./home/packages/new_rclone/patches/rclone_8ffe3e462cbf5688c37c54009db09d8dcb486860.diff ];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
diff --git a/backend/webdav/chunking.go b/backend/webdav/chunking.go
|
|
||||||
index 4cea798389f73..379079cf9f015 100644
|
|
||||||
--- a/backend/webdav/chunking.go
|
|
||||||
+++ b/backend/webdav/chunking.go
|
|
||||||
@@ -14,21 +14,30 @@ import (
|
|
||||||
"io"
|
|
||||||
"net/http"
|
|
||||||
"path"
|
|
||||||
+ "time"
|
|
||||||
|
|
||||||
"github.com/rclone/rclone/fs"
|
|
||||||
"github.com/rclone/rclone/lib/readers"
|
|
||||||
"github.com/rclone/rclone/lib/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
-func (f *Fs) shouldRetryChunkMerge(ctx context.Context, resp *http.Response, err error) (bool, error) {
|
|
||||||
+func (f *Fs) shouldRetryChunkMerge(ctx context.Context, resp *http.Response, err error, sleepTime *time.Duration, wasLocked *bool) (bool, error) {
|
|
||||||
// Not found. Can be returned by NextCloud when merging chunks of an upload.
|
|
||||||
if resp != nil && resp.StatusCode == 404 {
|
|
||||||
+ if *wasLocked {
|
|
||||||
+ // Assume a 404 error after we've received a 423 error is actually a success
|
|
||||||
+ return false, nil
|
|
||||||
+ }
|
|
||||||
return true, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// 423 LOCKED
|
|
||||||
if resp != nil && resp.StatusCode == 423 {
|
|
||||||
- return false, fmt.Errorf("merging the uploaded chunks failed with 423 LOCKED. This usually happens when the chunks merging is still in progress on NextCloud, but it may also indicate a failed transfer: %w", err)
|
|
||||||
+ *wasLocked = true
|
|
||||||
+ fs.Logf(f, "Sleeping for %v to wait for chunks to be merged after 423 error", *sleepTime)
|
|
||||||
+ time.Sleep(*sleepTime)
|
|
||||||
+ *sleepTime *= 2
|
|
||||||
+ return true, fmt.Errorf("merging the uploaded chunks failed with 423 LOCKED. This usually happens when the chunks merging is still in progress on NextCloud, but it may also indicate a failed transfer: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return f.shouldRetry(ctx, resp, err)
|
|
||||||
@@ -180,9 +189,11 @@ func (o *Object) mergeChunks(ctx context.Context, uploadDir string, options []fs
|
|
||||||
}
|
|
||||||
opts.ExtraHeaders = o.extraHeaders(ctx, src)
|
|
||||||
opts.ExtraHeaders["Destination"] = destinationURL.String()
|
|
||||||
+ sleepTime := 5 * time.Second
|
|
||||||
+ wasLocked := false
|
|
||||||
err = o.fs.pacer.Call(func() (bool, error) {
|
|
||||||
resp, err = o.fs.srv.Call(ctx, &opts)
|
|
||||||
- return o.fs.shouldRetryChunkMerge(ctx, resp, err)
|
|
||||||
+ return o.fs.shouldRetryChunkMerge(ctx, resp, err, &sleepTime, &wasLocked)
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("finalize chunked upload failed, destinationURL: \"%s\": %w", destinationURL, err)
|
|
|
@ -14,13 +14,8 @@ let
|
||||||
ps3dec = pkgs.callPackage ./packages/ps3dec/package.nix {};
|
ps3dec = pkgs.callPackage ./packages/ps3dec/package.nix {};
|
||||||
sabretools = pkgs.callPackage ./packages/sabretools/package.nix {};
|
sabretools = pkgs.callPackage ./packages/sabretools/package.nix {};
|
||||||
rom-properties = pkgs.callPackage ./packages/rom-properties/package.nix {};
|
rom-properties = pkgs.callPackage ./packages/rom-properties/package.nix {};
|
||||||
new_rclone = pkgs.rclone.overrideAttrs (oldAttrs: rec {
|
|
||||||
patches = [ ./packages/new_rclone/patches/rclone_8ffe3e462cbf5688c37c54009db09d8dcb486860.diff ];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -112,6 +107,7 @@ in
|
||||||
pkgs.pyrosimple
|
pkgs.pyrosimple
|
||||||
pkgs.python3
|
pkgs.python3
|
||||||
pkgs.quickbms
|
pkgs.quickbms
|
||||||
|
pkgs.rclone
|
||||||
pkgs.screen
|
pkgs.screen
|
||||||
pkgs.sshfs
|
pkgs.sshfs
|
||||||
pkgs.unrar-wrapper
|
pkgs.unrar-wrapper
|
||||||
|
@ -123,7 +119,6 @@ in
|
||||||
my_packages.ird_tools
|
my_packages.ird_tools
|
||||||
my_packages.ps3dec
|
my_packages.ps3dec
|
||||||
my_packages.sabretools
|
my_packages.sabretools
|
||||||
my_packages.new_rclone
|
|
||||||
# my_packages.rom-properties
|
# my_packages.rom-properties
|
||||||
|
|
||||||
agenix.packages.${system}.default
|
agenix.packages.${system}.default
|
||||||
|
@ -138,8 +133,6 @@ in
|
||||||
# Not needed on WSL
|
# Not needed on WSL
|
||||||
pkgs.p7zip
|
pkgs.p7zip
|
||||||
# Replaced in favour of nixpkgs#_7zz
|
# Replaced in favour of nixpkgs#_7zz
|
||||||
# pkgs.rclone
|
|
||||||
# my_packages.new_rclone is the version with the patched build.
|
|
||||||
pkgs.terminator
|
pkgs.terminator
|
||||||
# Not needed on WSL, even though I'd like it on WSL sometimes.
|
# Not needed on WSL, even though I'd like it on WSL sometimes.
|
||||||
pkgs.yt-dlp
|
pkgs.yt-dlp
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/* Last reviewied: 2024-05-29
|
|
||||||
|
|
||||||
fixes issues with lack of HTTP header sanitization in .NET Core, see:
|
|
||||||
- https://github.com/NixOS/nixpkgs/issues/315574
|
|
||||||
- https://github.com/microsoftgraph/msgraph-cli/issues/477
|
|
||||||
*/
|
|
||||||
{ lib, options, ... }: {
|
|
||||||
/*
|
|
||||||
using just `readOnly` because it can contain neither of: default, example, description, apply, type
|
|
||||||
see https://github.com/NixOS/nixpkgs/blob/aae38d0d557d2f0e65b2ea8e1b92219f2c0ea8f9/lib/modules.nix#L752-L756
|
|
||||||
*/
|
|
||||||
options.system.nixos.codeName = lib.mkOption { readOnly = false; };
|
|
||||||
config.system.nixos.codeName =
|
|
||||||
let
|
|
||||||
codeName = options.system.nixos.codeName.default;
|
|
||||||
renames."Vicuña" = "Vicuna";
|
|
||||||
in
|
|
||||||
renames."${codeName}" or (throw "Unknown `codeName`: ${codeName}, please add it to `renames` in `ascii-workaround.nix`");
|
|
||||||
}
|
|
Loading…
Reference in a new issue