Unverified Commit 601099ee authored by isabel's avatar isabel Committed by GitHub
Browse files

syncthing: 1.30.0 -> 2.0.3; nixos/synthing: fix flags against 2.0 (#436432)

parents ca484335 063267b7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th
  inputs.nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
  ```

- Syncthing has been updated to version 2.0.0.

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

## New Modules {#sec-release-25.05-new-modules}
+13 −8
Original line number Diff line number Diff line
@@ -894,14 +894,19 @@ in
                  install -Dm600 -o ${cfg.user} -g ${cfg.group} ${toString cfg.key} ${cfg.configDir}/key.pem
                ''}
              ''}";
          ExecStart = ''
            ${cfg.package}/bin/syncthing \
              -no-browser \
              -gui-address=${if isUnixGui then "unix://" else ""}${cfg.guiAddress} \
              -config=${cfg.configDir} \
              -data=${cfg.databaseDir} \
              ${escapeShellArgs cfg.extraFlags}
          '';
          ExecStart =
            let
              args = lib.escapeShellArgs (
                (lib.cli.toGNUCommandLine { } {
                  "no-browser" = true;
                  "gui-address" = (if isUnixGui then "unix://" else "") + cfg.guiAddress;
                  "config" = cfg.configDir;
                  "data" = cfg.databaseDir;
                })
                ++ cfg.extraFlags
              );
            in
            "${lib.getExe cfg.package} ${args}";
          MemoryDenyWriteExecute = true;
          NoNewPrivileges = true;
          PrivateDevices = true;
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ let
    name:
    pkgs.runCommand "syncthing-test-certs-${name}" { } ''
      mkdir -p $out
      ${pkgs.syncthing}/bin/syncthing generate --config=$out
      ${pkgs.syncthing}/bin/syncthing generate --home=$out
      ${pkgs.libxml2}/bin/xmllint --xpath 'string(configuration/device/@id)' $out/config.xml > $out/id
    '';
  idA = genNodeId "a";
+2 −2
Original line number Diff line number Diff line
@@ -55,8 +55,8 @@
    a.wait_for_open_port(22000)
    b.wait_for_open_port(22000)

    aDeviceID = a.succeed("syncthing -home=%s -device-id" % confdir).strip()
    bDeviceID = b.succeed("syncthing -home=%s -device-id" % confdir).strip()
    aDeviceID = a.succeed("syncthing --home=%s device-id" % confdir).strip()
    bDeviceID = b.succeed("syncthing --home=%s device-id" % confdir).strip()
    addPeer(a, "b", bDeviceID)
    addPeer(b, "a", aDeviceID)

+3 −3
Original line number Diff line number Diff line
@@ -19,16 +19,16 @@ let
    }:
    buildGoModule rec {
      pname = stname;
      version = "1.30.0";
      version = "2.0.3";

      src = fetchFromGitHub {
        owner = "syncthing";
        repo = "syncthing";
        tag = "v${version}";
        hash = "sha256-GKyzJ2kzs2h/tfb3StSleGBofiKk6FwVcSkCjsJRvRY=";
        hash = "sha256-s5kW7FJfLSTezG/PvRGEoBBlMhYUoszpduKFKlnCcaU=";
      };

      vendorHash = "sha256-Soky/3wEmP1QRy8xfL68sTHi3CSl4nbCINmG0DY2Qys=";
      vendorHash = "sha256-Ws++TwmOcWe1ArRuQzIgEIUCHGC30LU4Y4zYUrBkpmA=";

      nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
        # Recent versions of macOS seem to require binaries to be signed when