aur/woodpecker/fix-encryption.patch

49 lines
1.9 KiB
Diff
Raw Normal View History

2023-11-19 19:52:11 +01:00
From e85ff99be5887dd3dc21edbe29fcec4a3c737c01 Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Sun, 19 Nov 2023 19:43:25 +0100
Subject: [PATCH] fix: encryption
---
cmd/server/server.go | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/cmd/server/server.go b/cmd/server/server.go
index c35e39293..495c11436 100644
--- a/cmd/server/server.go
+++ b/cmd/server/server.go
@@ -50,8 +50,8 @@ import (
"go.woodpecker-ci.org/woodpecker/server/web"
"go.woodpecker-ci.org/woodpecker/shared/constant"
"go.woodpecker-ci.org/woodpecker/version"
- // "go.woodpecker-ci.org/woodpecker/server/plugins/encryption"
- // encryptedStore "go.woodpecker-ci.org/woodpecker/server/plugins/encryption/wrapper/store"
+ "go.woodpecker-ci.org/woodpecker/server/plugins/encryption"
+ encryptedStore "go.woodpecker-ci.org/woodpecker/server/plugins/encryption/wrapper/store"
)
func run(c *cli.Context) error {
@@ -288,13 +288,13 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) {
// TODO(1544): fix encrypted store
// // encryption
- // encryptedSecretStore := encryptedStore.NewSecretStore(v)
- // err := encryption.Encryption(c, v).WithClient(encryptedSecretStore).Build()
- // if err != nil {
- // log.Fatal().Err(err).Msg("could not create encryption service")
- // }
- // server.Config.Services.Secrets = setupSecretService(c, encryptedSecretStore)
- server.Config.Services.Secrets = setupSecretService(c, v)
+ encryptedSecretStore := encryptedStore.NewSecretStore(v)
+ err := encryption.Encryption(c, v).WithClient(encryptedSecretStore).Build()
+ if err != nil {
+ log.Fatal().Err(err).Msg("could not create encryption service")
+ }
+ server.Config.Services.Secrets = setupSecretService(c, encryptedSecretStore)
+ //server.Config.Services.Secrets = setupSecretService(c, v)
server.Config.Services.Environ = setupEnvironService(c, v)
server.Config.Services.Membership = setupMembershipService(c, f)
--
2.42.1