From 9c2aef88ba135f37da80b8ebcb87aa6e4d929b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= <66256922+daniel-weisse@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:25:51 +0200 Subject: [PATCH] debugd: remove `--debug` flag from bootstrapper service created by debugd (#3150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- debugd/internal/debugd/deploy/service.go | 2 +- debugd/internal/debugd/deploy/service_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debugd/internal/debugd/deploy/service.go b/debugd/internal/debugd/deploy/service.go index 2c71891cc3..806e8abbc2 100644 --- a/debugd/internal/debugd/deploy/service.go +++ b/debugd/internal/debugd/deploy/service.go @@ -172,7 +172,7 @@ func (s *ServiceManager) OverrideServiceUnitExecStart(ctx context.Context, unitN if strings.Contains(execStart, "\n") || strings.Contains(execStart, "\r") { return fmt.Errorf("execStart must not contain newlines") } - overrideUnitContents := fmt.Sprintf("[Service]\nExecStart=\nExecStart=%s $CONSTELLATION_DEBUG_FLAGS\n", execStart) + overrideUnitContents := fmt.Sprintf("[Service]\nExecStart=\nExecStart=%s\n", execStart) s.systemdUnitFilewriteLock.Lock() defer s.systemdUnitFilewriteLock.Unlock() path := filepath.Join(systemdUnitFolder, unitName+".service.d", "override.conf") diff --git a/debugd/internal/debugd/deploy/service_test.go b/debugd/internal/debugd/deploy/service_test.go index 7ee879644a..c0c98f93e7 100644 --- a/debugd/internal/debugd/deploy/service_test.go +++ b/debugd/internal/debugd/deploy/service_test.go @@ -218,7 +218,7 @@ func TestOverrideServiceUnitExecStart(t *testing.T) { }, unitName: "test", execStart: "/run/state/bin/test", - wantFileContents: "[Service]\nExecStart=\nExecStart=/run/state/bin/test $CONSTELLATION_DEBUG_FLAGS\n", + wantFileContents: "[Service]\nExecStart=\nExecStart=/run/state/bin/test\n", wantActionCalls: []dbusConnActionInput{ {name: "test.service", mode: "replace"}, }, @@ -264,7 +264,7 @@ func TestOverrideServiceUnitExecStart(t *testing.T) { }, unitName: "test", execStart: "/run/state/bin/test", - wantFileContents: "[Service]\nExecStart=\nExecStart=/run/state/bin/test $CONSTELLATION_DEBUG_FLAGS\n", + wantFileContents: "[Service]\nExecStart=\nExecStart=/run/state/bin/test\n", wantActionCalls: []dbusConnActionInput{ {name: "test.service", mode: "replace"}, },