From 7c2319905daf9e9142ad68585d3c10dc8c4d5069 Mon Sep 17 00:00:00 2001 From: Vincent Haupert Date: Fri, 28 Jan 2022 09:43:44 +0100 Subject: [PATCH] nixos/github-runner: use `--disableupdate` flag Use the new `--disableupdate` configure flag instead of our patch. --- .../continuous-integration/github-runner.nix | 1 + .../github-runner/default.nix | 3 --- .../patches/prevent-self-update.patch | 25 ------------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch diff --git a/nixos/modules/services/continuous-integration/github-runner.nix b/nixos/modules/services/continuous-integration/github-runner.nix index afd85c972b56..c3bd8f99c57f 100644 --- a/nixos/modules/services/continuous-integration/github-runner.nix +++ b/nixos/modules/services/continuous-integration/github-runner.nix @@ -208,6 +208,7 @@ in token=$(< "$STATE_DIRECTORY"/${newConfigTokenFilename}) RUNNER_ROOT="$STATE_DIRECTORY" ${cfg.package}/bin/config.sh \ --unattended \ + --disableupdate \ --work "$RUNTIME_DIRECTORY" \ --url ${escapeShellArg cfg.url} \ --token "$token" \ diff --git a/pkgs/development/tools/continuous-integration/github-runner/default.nix b/pkgs/development/tools/continuous-integration/github-runner/default.nix index c3b9e987b430..67433ab5d88a 100644 --- a/pkgs/development/tools/continuous-integration/github-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/github-runner/default.nix @@ -77,9 +77,6 @@ stdenv.mkDerivation rec { ./patches/use-get-directory-for-diag.patch # Don't try to install systemd service ./patches/dont-install-systemd-service.patch - # Prevent the runner from starting a self-update for new versions - # (upstream issue: https://github.com/actions/runner/issues/485) - ./patches/prevent-self-update.patch ]; postPatch = '' diff --git a/pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch b/pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch deleted file mode 100644 index da73cd75a096..000000000000 --- a/pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8b77c9c61058842e031dd176df2b9c79bc2c0e28 Mon Sep 17 00:00:00 2001 -From: Vincent Haupert -Date: Sun, 12 Sep 2021 19:52:21 +0200 -Subject: [PATCH] Use a fake version to prevent self-update - ---- - src/Runner.Listener/MessageListener.cs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Runner.Listener/MessageListener.cs b/src/Runner.Listener/MessageListener.cs -index 71e5e43..29945e0 100644 ---- a/src/Runner.Listener/MessageListener.cs -+++ b/src/Runner.Listener/MessageListener.cs -@@ -65,7 +65,7 @@ namespace GitHub.Runner.Listener - { - Id = _settings.AgentId, - Name = _settings.AgentName, -- Version = BuildConstants.RunnerPackage.Version, -+ Version = "2.999.9", - OSDescription = RuntimeInformation.OSDescription, - }; - string sessionName = $"{Environment.MachineName ?? "RUNNER"}"; --- -2.32.0 -