From 4bec20404c0daa665ab188bdbad168249dcf6253 Mon Sep 17 00:00:00 2001 From: Diego Augusto Molina Date: Fri, 18 Oct 2024 12:46:17 -0300 Subject: [PATCH] fix accidentaly committed to main --- gpg/sign.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gpg/sign.go b/gpg/sign.go index d719173..252871e 100644 --- a/gpg/sign.go +++ b/gpg/sign.go @@ -35,17 +35,7 @@ func Signer(d *dagger.Client, pubkey, privkey, passphrase string) *dagger.Contai WithMountedSecret("/root/.rpmdb/privkeys/grafana.key", gpgPrivateKeySecret). WithMountedSecret("/root/.rpmdb/pubkeys/grafana.key", gpgPublicKeySecret). WithMountedSecret("/root/.rpmdb/passkeys/grafana.key", gpgPassphraseSecret). - WithExec([]string{"/bin/sh", "-c", ` - if grep -q "PUBLIC KEY" "/root/.rpmdb/pubkeys/grafana.key"; then - cp "/root/.rpmdb/pubkeys/grafana.key" "/tmp/grafana.key"; - else - gpg --enarmor "/root/.rpmdb/pubkeys/grafana.key" > "/tmp/grafana.key"; - fi; - if [ "$(tail -n 1 "/tmp/grafana.key" | wc -l)" = 0 ]; then - echo >> "/tmp/grafana.key"; - fi; - `}). - WithExec([]string{"rpm", "--import", "/tmp/grafana.key"}). + WithExec([]string{"rpm", "--import", "/root/.rpmdb/pubkeys/grafana.key"}). WithNewFile("/root/.rpmmacros", RPMMacros, dagger.ContainerWithNewFileOpts{ Permissions: 0400, }).