From 81052fb5011417d31ee0426f1d6b63d9316ee8ea Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Tue, 1 Oct 2019 13:55:19 +0700 Subject: [PATCH] pacstrap: Add siglevel option for repositories Signed-off-by: Arnaud Rebillout --- actions/pacstrap_action.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/actions/pacstrap_action.go b/actions/pacstrap_action.go index b6deec5f..8570cb2b 100644 --- a/actions/pacstrap_action.go +++ b/actions/pacstrap_action.go @@ -17,6 +17,7 @@ Yaml syntax for repositories: repositories: - name: repository name server: server url + siglevel: signature checking settings (optional) */ package actions @@ -46,8 +47,9 @@ Server = %s ` type Repository struct { - Name string - Server string + Name string + Server string + SigLevel string } type PacstrapAction struct { @@ -73,6 +75,9 @@ func (d *PacstrapAction) Run(context *debos.DebosContext) error { if err != nil { return fmt.Errorf("Couldn't write to pacman config: %v", err) } + if r.SigLevel != "" { + f.WriteString(fmt.Sprintf("SigLevel = %s\n", r.SigLevel)) + } } f.Close()